The following JQuery line lets me get passed validation but the serverside raises an error.
$(document).ready(function () {
$("#save").click(function () {
$("#WizForm").validate({
onsubmit: false
});
});
How do I set the ModelState to be successful and allow me to continue to save my data as a draft entry?
Right now I get the following error. Should I remove the rules?
Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details.
As Andrew Whitaker suggested, you should have two different controller actions, one for drafts (forms which fail validation), and one for final forms which pass validation. In addition, you should create an unvalidated model for your draft object.
Your client side script should be similar to the following:
Then, create a model without validation, and use this model in your SaveDraft controller action.
counsellorben