I'm currently using a form that uses a Regular Expression Validator for validating phone # information. After testing the validator out, I found that the validator will catch errors where 1, and 2 numbers are inputted. It won't however catch the instance where the user doesn't put anything. I know that there is a RequiredFieldValidator in ASP.NET, but doing regular expression of \d{3} should catch all errors of 0 input,1 input, or 2 input. Heres one of the validator calls, any advice on if I goofed up, or going about this the wrong way would be appreciated.
<asp:RegularExpressionValidator runat="server"
id="prefix" ControlToValidate="textprefix"
ValidationExpression="\d{3}"
Error Message ="*"
CausesValidation = "False" />
Thanks
wahoo02
<asp:RegularExpressionValidator runat="server"
id="prefix" ControlToValidate="textprefix"
ValidationExpression="\d{3}"
Error Message ="*"
CausesValidation = "False" />
Thanks
wahoo02