- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2022 05:30 AM - edited ‎12-12-2022 05:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2022 05:42 AM
Try with below script.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
// now check the length
if (newValue.toString().length != 16) {
alert("Password should have exact 16 letters");
g_form.clearValue('backend_name_of_your_password_variable'); // Make sure to use backend name of your variable.
}
}
You can also utilize Variable Validation Regex to create regex as per your need and use that regex for validation of your variables, however it is not available for all types of variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2022 05:42 AM
Try with below script.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
// now check the length
if (newValue.toString().length != 16) {
alert("Password should have exact 16 letters");
g_form.clearValue('backend_name_of_your_password_variable'); // Make sure to use backend name of your variable.
}
}
You can also utilize Variable Validation Regex to create regex as per your need and use that regex for validation of your variables, however it is not available for all types of variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2022 06:21 AM - edited ‎12-12-2022 05:40 AM
-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2022 06:27 AM
just have -- return false -- statement in the onSubmit client script.. so that it will not get submitted
function onSubmit() {
var password = g_form.getValue('password_field_back_end_name').toString().length;
if(password != 16) {
alert('Password should have exact 16 letters');
return false;
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-08-2022 06:14 AM - edited ‎12-12-2022 05:41 AM
-