You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
Tandulje
changed the title
Using jquery -v3.5.1 and jquery.validate -v1.9.2 then $('form').validate().settings; not working
$('form').validate().settings; not working Using jquery -v3.5.1
Aug 14, 2020
When you create a validator, without passing any parameters, rules is an empty object('{}') by default。
so ‘settings.rules['UserPrincipalName'].required = true’ will get a exception ('VM155:294 Uncaught TypeError: Cannot set property 'required' of undefined')。 it has nothing to do with jquery or jquery-validation,This is a grammatical problem
you can pass your custom parameters when createing the validator。like this:
var settings = $('form').validate({
rules:{
'UserPrincipalName':{
'required':true
}
}
)
or
var settings = $('form').validate().settings;
settings.rules['UserPrincipalName'] ={ 'required ':true}
This issue/proposal has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automatically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and one of the maintainers will (try!) to follow up.
Thank you for contributing :)
Hi...i'am using jquery -v3.5.1 and jquery.validate -v1.9.2
My code is
var settings = $('form').validate().settings;
settings.rules['UserPrincipalName'].required = true;
it gives error
VM155:294 Uncaught TypeError: Cannot set property 'required' of undefined
When i was on older version jquey -v2.1.4 then it was working fine but now not working with jquey- v3.5.1
Please give some solution on it.
I go through lots of link but not getting related to this.
Please let me know how can i fix this issue.
Originally posted by @Tandulje in #2328 (comment)
The text was updated successfully, but these errors were encountered: