Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2024 01:35 AM
Hi,
I have a requirement where the following format is only accepted for a field. Kindly help.
rocisw01nfs.unix.rabk.com:/appshares/san
Regards
Suman P.
Solved! Go to Solution.
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2024 02:46 AM
@Community Alums Please update your script as follows.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var re = /^[a-z0-9]+.[a-z]+.[a-z]+.[a-z]+:\/[a-z]+\/[a-z]+$/;
if (!re.test(g_form.getValue('nfs_export')) {
g_form.addErrorMessage('Invalid format for NFS Export');
g_form.clearValue('nfs_export');
return false;
}
}
Hope this helps.
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2024 03:47 AM
Hi @Sandeep Rajput ,
I was making a mistake, I should have tested with the value of the field instead of field itself.
Regards
Suman P.