We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70b1728 commit 2c4f938Copy full SHA for 2c4f938
Client-Side Components/Client Scripts/Phone Number Validation /README.md
@@ -0,0 +1,14 @@
1
+We are building a form in ServiceNow where a user must enter their phone number.
2
+The requirement is that only valid Indian mobile numbers should be accepted. A valid number should:
3
+
4
+Optionally start with 0 or 91
5
6
+Be exactly 10 digits long
7
8
+Start with digits 6, 7, 8, or 9
9
10
+If the user enters anything invalid, the form should not be submitted, and an error message should be shown.
11
12
+g_form.getValue → gets the phone field value.
13
+Regex → allows numbers like 9876543210, 0919876543210, 919876543210.
14
+Validation → If the value is invalid, shows alert and blocks submission.
0 commit comments