I have read several posts on the same topic, but none solved the problem in hand.
I have a button on the page, when clicked, retrieves a PartialView from server & opens it in a jQuery UI Dialog. If users clicks "Save" button on the dialog, I am sending a POST to server to save the record.
jQuery.validate & jQuery.unobtrusive files are both loaded onto the page + client side validation is enabled.
When the View is loaded, I am adding the following:
$.validator.unobtrusive.parse($("#PostForm"));
Before, posting, I" am checking on:
if ($("#Postform").valid()) {
Yet, I find an error in the console (jquery.validate.js) saying:
Uncaught TypeError: Cannot read property 'form' of undefined
What else is needed to enable unobtrusive validation with dynamic views?
Thanks