I’ve got validation working with DataAnnotations on all my models, but I’d like to display an indicator for required fields on page load. Since I’ve got all my validation centralized, I’d rather not hard-code indicators in the View. Calling validation on load would show the validation summary. Has anyone found a good way of letting the model determine what’s required, but checking it upon rendering the view, similar to Html.ValidationMessageFor?
I’ve got validation working with DataAnnotations on all my models, but I’d like to
Share
This is off the top of my head, but it should get you started: