Is it possible to have a check condition in the view if the field in the model is valid?
I have a view page that contains username and password field. There fields are having [Required] attribute in the model class so that this two fields will validate if not supplied.
My goal is to change the css of a label in the view if this field is not valid.
Anyone please advise. Thanks in advance!
You can use jQuery with the unobtrusive validation used by MVC.
This answer and this should give you two ways you can use