I have two helpers: Html.TextBox and Html.TextBoxFor
Html.TextBox(someId, someValue, new { @class = "text-box single-line numericPropertyValue", regexp=@"^(-?\d{0,9}([.]\d{0,5})?)?$", minValue = someMinValue, maxValue = someMaxValue, invalidValueMessage = ValidationMessages.ValueIsIncorrect(), invalidRangeMessage = ValidationMessages.InvalidRangeMessage(someMinValue, someMaxValue) })
This one specifies Budget and allows me to input only digits.digits and works fine.
Another one is Html.TextBoxFor:
Html.TextBoxFor(x => x.some.Name, new { @class = "text-box single-line numericPropertyValue", regExp = @"^[a-zA-Z0-9]", invalidValueMessage = "value is invalid" })
This one specifies Name for some item, never mind. But my regex is not working. However, if I put there regex from the first Html.TextBox, it is still not working and allows me to enter everything.
Do u know what is wrong with my TextBoxFor?
Thanks a lot.