How to force alpha or numeric inside text fields - LiveCycle Designer 9.0



I am creating a form that requires City, State and Zip.  I need to make sure that users do not put City, State and Zip into the City field; which someone so nicely pointed out to me as a problem with the form.  Anyway, what I am looking for is a way to force the user to only be able to enter alpha characters into the City text field.  I had glanced at the "Validation Patterns" OOTB functionality but I could not find anything listed that would complete the requirement.

Thank you,

View Entire Topic



I did try the code above few days back and it did not work

It did today!

I am writing the below in the exit event too, cuz the above code holds good only when the user is typing.

if (!xfa.this.rawValue.charAt(0).match(/[a-zA-Z0-9]/g)) { 

  this.rawValue = null;;


Thanks a lot radzmar!