Skip to Content
0

Validate Alphanumeric value with no space

Mar 03, 2017 at 06:58 PM

41

avatar image
Former Member

Hello,

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\$/)) {

xfa.host.messageBox("Please enter alphanumeric only");

xfa.host.setFocus(this);

xfa.event.change = "";//

}

Could you please help me find the syntax?

Thank you in advance!

Marie.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers