You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
After this change #2812, float and double uses type="text" which disables the browser specific validation of number fields.
We need to add support for client side validation. One way of doing that would be to add pattern attribute that contains a regex based on the current culture.
MVC 5 has a ClientDataTypeModelValidatorProvider exactly for this purpose, which emits a data-val-number validation attribute for all basic numeric types (like decimal, float, byte, uint, etc.), and data-val-date for DateTime (exempting DataType.Time). I can't find an analogue in MVC 6.
Although it's probably easier to customize a jQuery Validate rule like number or date (which many of us have had to do already for MVC 3-5), a culture-sensitive (generated) validator could work right out of the box, which is something that's really missing right now.
After this change #2812,
float
anddouble
usestype="text"
which disables the browser specific validation of number fields.We need to add support for client side validation. One way of doing that would be to add
pattern
attribute that contains a regex based on the current culture.cc' @dougbu @NTaylorMullen
The text was updated successfully, but these errors were encountered: