报错 Cannot read property 'settings' of undefined

Symptom:

the reason:

Jquery.validate.unobtrusive.js based on the principle of operation, it will respond as soon as the page loads. $. Validator.unobtrusive.parse (document) read element analytical data-val- * marked complete nuclear inspection condition setting it also means that after the addition of <input> or append data-val- * will not be included in the subject nuclear program before the form is submitted

In short, it is because I have this jquery Modal is dynamically added is generated dynamically initialized and then verify that the code behind or have a custom validation verification did not find it

Solution: Add $ .validator.unobtrusive.parse ( "# NewModal") before a custom validation; NewModal frame mode is id

Thanks: https: //www.cnblogs.com/xcj1989/archive/2012/06/30/2571047.html

Above if there is wrong to say I hope you correct me a lot of comments to avoid more people astray

 

Guess you like

Origin www.cnblogs.com/polarisone/p/11236654.html