How to check input length? Like 'A' field must be filled with 5 digits number . How to implement this?
Input length check
-
- User
- Posts: 1043
based on which validation you selected -- client side or server side validation
override the Form_CustomValidate() and enter your validation code for the field.
Server Side:
function Form_CustomValidate(&$customError) {
$rs = $this->GetFieldValues("FormValue"); // Get the form values as array
if (intval($rs["Qty"]) % 10 != 0) {
// Return error message in $customError
$customError = "Order quantity must be multiples of 10.";
return FALSE;
}
return TRUE;
}
OR client side script (Client Scripts - Table Specific)
function(fobj) { // DO NOT CHANGE THIS LINE!
// Your custom validation code here, return false if invalid.
return true;
}
refer to the help file.