Monday, 9 September 2013

asp net comparevalidator type double datatypecheck allows incorrect values

asp net comparevalidator type double datatypecheck allows incorrect values

ASP NET 4.0 on win 7
If i put a comparevalidator like this
<asp:CompareValidator ID="cmprValidatorDoubleType"
ControlToValidate="TextBox10" Type="Double" Display="Dynamic"
Operator="DataTypeCheck" ErrorMessage="*Not a valid number."
runat="server"></asp:CompareValidator>
It will accept values such as "5." (without the commas) values without
decimals
Is this a normal and expected behaviour?

No comments:

Post a Comment