In my view I have a button that submits the form:
<input type="button" value="Save Only" id="save" onclick="submitForm('SaveOnly')" />
This is one of a few different buttons, all of which will be handled differently in different Controller Action methods.
Also in the view is this submitForm(action) Javascript method:
function submitForm(action) {
var form = document.getElementById("myForm");
form.action = "/Area/MyController/" + action;
form.submit();
}
When I use a submit button (rather than type="button"), unobtrusive client-side validation works properly. However, when I use this submitForm(action) function, the client-side validation does not happen. How can trigger the client side validation?