Skip to content

Commit 0998d9e

Browse files
Create Readme.md
1 parent 0b558c5 commit 0998d9e

File tree

1 file changed

+39
-0
lines changed
  • Client-Side Components/Client Scripts/validate phone number

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
Phone Number Validation — Client Script
2+
Overview
3+
4+
This Client Script validates that users enter their phone numbers in the strict format: (123) 456-7890.
5+
6+
It is triggered whenever the Phone field changes on a sys_user record. If the input does not match the required format, the script:
7+
8+
Displays an inline error message directly below the field.
9+
10+
Clears the invalid input so the user can re-enter the correct value.
11+
12+
This script is designed to be dynamic, simple, and user-friendly.
13+
14+
Features
15+
16+
Ensures phone numbers follow the exact format (123) 456-7890.
17+
18+
Provides immediate feedback via field-level error messages.
19+
20+
Clears invalid entries automatically to prevent submission errors.
21+
22+
Works on Classic UI forms and provides clear messaging to the user.
23+
24+
Usage Instructions
25+
1. Create the Client Script
26+
27+
Navigate to System Definition → Client Scripts.
28+
29+
Click New to create a client script.
30+
31+
2. Configure the Script
32+
33+
Name: Phone Number Validation
34+
35+
Table: sys_user
36+
37+
Type: onChange
38+
39+
Field: phone

0 commit comments

Comments
 (0)