0
People I’m having trouble in Asp.NET MVC when I use numerical field I’m having error. Razor is like this
@Html.EditorFor(model => model.AliqIpi, new
{
htmlAttributes = new {
@class = "form-control", @style = "text-align: right;", @type = "number", @min = "0", @step = "0.01", @value = "0"
}
})
@Html.ValidationMessageFor(model => model.AliqIpi, "", new { @class = "text-danger" })
and when editing the record when I move the values to the grid does not show the numerical values and this error
The specified value "0,00" is not a Valid number. The value must match to the following regular Expression: -? ( d+| d+. d+|. d+)([ee][-+]? d+)?
Someone’s been through this?
type number only accepts numbers, if you are trying to add swap characters for
@type = "tel"
– Marconi
is number even, only keeps giving this error.
– Ulisses Correia
So,
,
It’s not number, change the type totel
– Marconi