fix: Phone validation (#1987)

This commit is contained in:
Dhruwang Jariwala
2024-01-31 19:51:16 +05:30
committed by GitHub
parent 51a811ac8e
commit 43566a54b6

View File

@@ -94,7 +94,7 @@ export default function OpenTextQuestion({
onSubmit({ [question.id]: value, inputType: question.inputType }, updatedttc);
}
}}
pattern={question.inputType === "phone" ? "[+][0-9 ]+" : ".*"}
pattern={question.inputType === "phone" ? "[0-9+ ]+" : ".*"}
title={question.inputType === "phone" ? "Enter a valid phone number" : undefined}
/>
) : (