jQuery-Form-Validator icon indicating copy to clipboard operation
jQuery-Form-Validator copied to clipboard

reCaptcha don't work with jquery 3.1+

Open bakha opened this issue 8 years ago • 3 comments

Hi, recaptcha not showing if use jquery 3.1+ sorry for my english :) and Thank's for awesome plugin )

bakha avatar May 03 '17 06:05 bakha

This is true. Using jquery-3.2.1.min.js in the browser console I get:

security.js:9 Uncaught TypeError: Cannot read property 'validationConfig' of undefined at HTMLFormElement. (security.js:9) at Function.each (jquery-3.2.1.min.js:2) at r.fn.init.each (jquery-3.2.1.min.js:2) at b.reCaptchaLoaded (security.js:9) at Jp (recaptcha__en.js:379) at recaptcha__en.js:388 at recaptcha__en.js:400

Using jquery-2.2.4.min.js the reCaptcha appears OK

jbmorganQAA avatar May 10 '17 07:05 jbmorganQAA

Notes:

This may be a problem with how the config object, applied to $.setup(), gets monkey-patched onto the form elements. If this for some reason won't work with jQuery 3.1+ it effects both grecaptcha and $.fn.validate()

  • https://github.com/victorjonsson/jQuery-Form-Validator/blob/fd89f88fa04042c19fc155e7efb7fe30aa0224cf/src/main/jquery-plugins.js#L141
  • https://github.com/victorjonsson/jQuery-Form-Validator/blob/fd89f88fa04042c19fc155e7efb7fe30aa0224cf/src/modules/security.js#L563

victorjonsson avatar May 10 '17 07:05 victorjonsson

It still looks broken as of 2.3.79, I still get this error after having migrated my website from jQuery 2.4 to 3.3.1.

ManuHeel avatar Sep 28 '18 14:09 ManuHeel