Skip to Content

Validate Alphanumeric value with no space


I have to validate a field of 4 characters in Javascript that could be a numeric or a character. The user cannot write a space.

I searched on the forum but I did not find the right syntax to do the validation.

if (xfa.this.rawValue.match(/[^A-Za-z0-9]\S\$/)) {"Please enter alphanumeric only");;

xfa.event.change = "";//


Could you please help me find the syntax?

Thank you in advance!


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

0 Answers