Hello folks,
I have a TextField object on my form and I want to limit the user to enter alphabetic(A-Z) characters only(no numeric characters) .
I tried to do it using custom pattern, but without any success.
Is it possible to do it using custom pattern anyway? or do I need to write my own validate script for this simple purpose?
Thank you,
Yair Nevet
Views
Replies
Total Likes
You can use a regular expression in the change:Event of the text field
if(xfa.event.newText.match(/[^A-Za-z/]/))
{
xfa.event.change = "";
}
Views
Replies
Total Likes
Thank you,
that mean I can't use custom pattern and I have to write script, right?
Views
Replies
Total Likes
Correct,
patterns cannot be used to disallow digits or other characters in text fields.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies