$ ('selector'). The validation () function seems to be more built for an input type button than a button type. How do I get it to work with a button type in a form?
@using(Html.BeginForm(new {id="TheForm"}))
{
<input id="TheButton" type="button">
}
JQuery
$(document).ready(function() {
$("#TheForm").validate({
rules: {
"AuditDoc.Title": {
required: true
}
}
});
$("#TheButton").click(function() {
});
});
Using this basic idea, how would I get jquery to check the operation of a button, not a submit type button? I saw examples where jQuery automatically displays error messages when rules are not executed using the send type, but it does not work with the button type. I would appreciate any advice!
source
share