i can't enter the number 0.5 price, don't validate in mvc5

Feb 4 2019 12:39 PM
in textbox I can't enter the number 0.8 price I tried this attributes, But the same problem and show me a message The value '0.8' is not valid for Price.
 
[Required]
[Display(Name = "Price")]
[Range(0.002, 9999.99)]
[DataType(DataType.Currency)]
public decimal Price { get; set; }
@Html.EditorFor(model => model.Product, new { htmlAttributes = new { @type = "number" ,@class = "form-control", @min = "0.00" }

Answers (6)