Skip to content

Commit c4c8169

Browse files
Add README for email validation catalog client script
1 parent 5770383 commit c4c8169

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# ServiceNow Email Validation Catalog Client Script
2+
3+
## Overview
4+
Client-side validation script for ServiceNow catalog items to ensure proper email format in user input fields.
5+
6+
## Features
7+
- Real-time email format validation
8+
- Form submission prevention for invalid emails
9+
- User-friendly error messages
10+
- Standard email pattern validation
11+
12+
## Implementation
13+
1. Navigate to **Service Catalog > Catalog Client Scripts**
14+
2. Create new script and select catalog item
15+
3. Choose script type: **onSubmit** or **onChange**
16+
4. Replace `email_field_name` with your field variable name
17+
5. Save and activate
18+
19+
## Validation Rules
20+
- Required format: `user@domain.com`
21+
- Accepts: letters, numbers, dots, underscores, hyphens
22+
- Minimum 2-character domain extension
23+
24+
## Script Types
25+
- **onSubmit**: Validates before form submission
26+
- **onChange**: Real-time validation as user types
27+
28+
## Usage
29+
Best practice: Use both scripts for comprehensive validation and better user experience.

0 commit comments

Comments
 (0)