JQuery Validation

I have an asp:text box (txtUnitMinutes) in a gridview.  I need to create the following validations using JQuery.  I did not see a zone for this, so I have placed it in Javascript.

The text box should only allow the String of 'N/A' ... OR
The text box should allow any number up to five digits
jamesdean666Asked:
Who is Participating?
 
chaitu chaituCommented:
str = "97979";
reg1 = /^\d{5}$/;
alert((str == 'N/A' || reg1.test(str)))

0
 
jamesdean666Author Commented:
YAHTZEEEEE!  Thanks, that works great
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.