Hi Team,
I have create one basic form it contains some of the field and one of field is mobile number now i need to validate mobile number field for that i went to rules editor for mobile number field and written code like below
(this.value && this.value.match(new RegExp(/^[0-9]+$/) != null) ? false : true
It returns true or false value i need to send some custom validation message how i can do that
any suggestion is appreciated
Views
Replies
Total Likes
You can use the field properties to set the patterns for the field using the regex and specify the error message there in the property of the field
no need to go the rule editor route
Thanks for your input.
But if i want to send custom error message rules edit how i can send.
if you done any example sending error message from rules editor plz share with me
@manikanthar1295 you need to set custom error message using validateExpMessage
sample:
if(objStartTime.value < objEndTime.value){
//All validations are successfull
testResult = true;
}else{
//Start Time is after End Time
objStartTime.validateExpMessage = "Invalid Time periode. Please enter a earlier time for the 'start time'.";
testResult = false;
}
Views
Likes
Replies