Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}

var faxRegex = /^\d{10}$/; //allow only 10 digit in fax number field
if (!faxRegex.test(newValue)) {
g_form.addErrorMessage('Please enter a valid 10-digit fax number');
g_form.clearValue('fax_num');
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This script ensures that the fax number entered consists of exactly 10 digits.
Any input that doesn’t meet this requirement — such as numbers with fewer or more digits, letters, or special characters — will be automatically rejected to maintain proper validation and data consistency.
Loading