Email Validation issue
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2025 02:11 AM
I want that there is one field at form level whose type is "email". But when I am entering the email address which contains ":-" character it's showing error. Although when I have changed it via list view it is changing. How
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-22-2025 12:02 AM
Hi @amitp16 ,
Field validations only work within a form view. and if you want to check that in list view try to create OnCelledit client script
for example:
function onCellEdit(sysIDs, table, oldValues, newValue, callback) {
var saveAndClose = true;
var regex = /^(?![\.])[a-zA-Z0-9!#$%*\/?|^{}`~&'\+\-=_.]+(?<![.]+)@(?![\.-])[a-zA-Z0-9-_\.]+(\.[a-zA-Z0-9_]+)$/;
if(!regex.test(newValue)){
alert('Email is not valid');
callback(false);
}
else{
callback(true);
}
//callback(saveAndClose);
}
If this helped please like and mark it as an accepted solution.
Thanks,
BK