- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2016 04:53 AM
Need a validation scripts to validate Email field. Field should validate (@ and .)
if somebody attempts to enter the email address without @ and .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-11-2016 05:05 AM
There is a built in method:
if(oldValue != newValue){
g_form.hideFieldMsg('email', true);
if (!isEmailValid(newValue)) {
g_form.showFieldMsg('email', newValue + " is an invalid email, please re-enter email in correct format.",'error');
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 09:00 AM
hi all,
i have a similar solution ...... you may check it out
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var str = g_form.getValue('u_emai');
var n = str.indexOf("@");
var n1 = str.indexOf(".");
if (n == -1 || n1 == -1) {
g_form.addErrorMessage('Please enter the valid email address!');
}
}