I’m trying to figure out a way to validate the user data entered:
View:
<div class="editor-field">
@Html.EditorFor(Function(model) model.CompleteWorkSample.EmailAddress)
@Html.ValidationMessageFor(Function(model) model.CompleteWorkSample.EmailAddress)
</div>
This is in MVC3, VB.net. I’m looking for an easy way to validate a users input data into the editorfor field.
Any help is appreciated. Thank you!
Why not Validate it in the Action method on your form post ?
Assuming you have decorated your properties with DataAnnotation attirbute
Sorry this is C#. I am not a VB.NET Guy.