Hello. I can not deal with the subject) Here I have this property in the model:
[Required(ErrorMessage = "Поле не заполнено")] public string MyValues { get; set; }
In the view, it is added as a hidden field:
@Html.HiddenFor(model => model.MyValues)
In the process of working with a form, some values are added to this field. How do I output ErrorMessage for this field if nothing is added to it? I tried to do this:
@Html.ValidationMessageFor(model => model.MyValues )
but something is not working.