Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 12:23 AM
Hi All,
Can someone please help me with Regex to validate below format. Field should basically accept only below format.
GITO_ESA_TC_090
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 12:30 AM
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue === '') {
return;
}
var pattern = /^GITO_ESA_TC_\d{3}$/;
if (!pattern.test(newValue)) {
g_form.showFieldMsg('your_field_name', 'Invalid format. Please use the format: GITO_ESA_TC_###', 'error');
} else {
g_form.hideFieldMsg('your_field_name');
}
}
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 12:28 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2024 12:30 AM
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue === '') {
return;
}
var pattern = /^GITO_ESA_TC_\d{3}$/;
if (!pattern.test(newValue)) {
g_form.showFieldMsg('your_field_name', 'Invalid format. Please use the format: GITO_ESA_TC_###', 'error');
} else {
g_form.hideFieldMsg('your_field_name');
}
}
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark