Posts by sarival • 1 point
1 post
-
0
votes1
answer61
viewsQ: I would like to understand why when Modelstate is invalid, Viewmodel instantiation is "ignored" and form fields remain populated?
Follows my code: Subcategory Model public class SubCategoria { public int Id { get; set; } [Required(ErrorMessage = "Campo {0} é obrigatório")] [StringLength(200, ErrorMessage = "Campo {0} precisa…