I'm having a problem with the forms validation of asp.net core when using a decimal field in my viewmodel, where the input's value receives a number with a comma but upon the submit it doesn't permit it..
ViewModel:
public class MyViewModel
{
public decimal Price { get; set; }
}
Razor page:
<div class="form-group row">
<label asp-for="Price" req-asterisk="true" class="col-md-3 col-lg-2 col-form-label"></label>
<div class="col-md-9 col-lg-10">
<input asp-for="Price" class="form-control" rows="4" />
<span asp-validation-for="Price" class="text-danger"></span>
</div>
</div>
So, if for example the Price property takes 4000, the input takes 4000,00 and if I click submit it says "The field Price must be a number."