I have this field:
public decimal Price { get; set; } public decimal Price { get; set; } in the database, it is decimal (7,2).
View:
@Html.EditorFor(model => model.Price, new { htmlAttributes = new { @class = "form-control" } })
If I put a semicolon, MVC does not accept by default, says: "The field must be a number" . (I tried using Regex, but not at all)
For example: 5,00, 55,00 or 555,00
Also this:
public DateTime date { get;set; }
View:
@Html.EditorFor(model => model.Date, new { htmlAttributes = new { @class = "form-control" } })
MVC checking does not accept dates in the format dd/mm/yyyy by default, only in mm/dd/yyyy .
For example: 13/02/2015, 15/06/2013, 25/08/2012
Is there something with globalization or what? How can i solve this?
source share