Regular Expression
ASP.NET
3
Posts
3
Posters
0
Views
1
Watching
-
This code always display errormessage "Must be numeric", even though i enter only numbers.Can anyone please reply for this. -- modified at 11:45 Friday 5th May, 2006
try ^([0-9]*)$
-
This code always display errormessage "Must be numeric", even though i enter only numbers.Can anyone please reply for this. -- modified at 11:45 Friday 5th May, 2006
You have specified that the field may only contain one digit. If you try to enter a one digit number you will se that it passes. You can use the \d code instead of [0-9]. Specify how many digits you allow, for an example unlimited: "\d+" or 1 to 5: "\d{1,5}". --- b { font-weight: normal; }