G
Guest
I am using a RegularExpressionValidator to validate a TextBox. I use
"^[\+|-]?[0-9]+(\.[0-9]*)?$" to check for a real number. The control works
fine as long as the user enters something in the TextBox; it does not work if
the user leaves the TextBox blank. Is there a bug in the implementation of
the RegularExpressionValidator? The above regluar expression should also
catch no entry by the user.
I have added a RequiredFieldValidator to solve the problem, but it does not
make sense to have two vlidators for the same textbox: a
RegularExpressionValidator and a RequiredFieldValidator.
Thanks.
"^[\+|-]?[0-9]+(\.[0-9]*)?$" to check for a real number. The control works
fine as long as the user enters something in the TextBox; it does not work if
the user leaves the TextBox blank. Is there a bug in the implementation of
the RegularExpressionValidator? The above regluar expression should also
catch no entry by the user.
I have added a RequiredFieldValidator to solve the problem, but it does not
make sense to have two vlidators for the same textbox: a
RegularExpressionValidator and a RequiredFieldValidator.
Thanks.