thegunner
thegunner

Reputation: 7153

Asp.net regular expression validator

I've two required fields on my form which I have made required using a required field validator.

I'm also looking to make the two text boxes only accept numeric input. Textbox 1 must be 7 digits only and textbox 2 has to be 6 digits only .

What would be the regular expressions for these?

Upvotes: 0

Views: 43

Answers (1)

Jay
Jay

Reputation: 57899

7 digits: ^\d{7}$

6 digits: ^\d{6}$

Upvotes: 5

Related Questions