Hi,
We need help in field level validation.
The requirement is Text Field should not allow special charecters and Numbers.
We have written following script in Exit event to restrict special chars and numbers.
if
(this.rawValue == null || this.rawValue == "")
{
// Nothing
}
else
if(!this.rawValue.match(/[a-z A-Z]+$/))
{
app.alert("Invalid entry"
, 1);
xfa.host.setFocus(
this);
}
The above script is working fine when we enter only numbers and special chars in the field.
But when we enter with the below Example combination script not working.
Ex: @#$123ABCD
Please help me
Regards,
Jay
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Change the regular expression pattern to this.rawValue.match(/^[a-zA-Z]+$/) in the if condition.
Regards
Shan
Views
Replies
Total Likes
Hi,
Change the regular expression pattern to this.rawValue.match(/^[a-zA-Z]+$/) in the if condition.
Regards
Shan
Views
Replies
Total Likes
Its working perfect...
Thank you Shan
Regards,
Jay
Views
Replies
Total Likes