parsley.js

Display parsley errors in bootstrap tooltip

谁都会走 提交于 2019-11-27 02:54:56
问题 I'm using parsley 2.0.0-rc5 and want display the error messages in a bootstrap tooltip. I'm using "parsley:field:error" but the event fires before the error is displayed in error-container and I can't pick up the error. Someone an idea how I get the error message for each field? $.listen('parsley:field:error', function (e) { dataParsleyId = e.$element.attr('data-parsley-id'); errorMsg = 'Error: ' + $('#parsley-id-'+dataParsleyId).text(); e.$element.attr('data-original-title', errorMsg); e.

Google ReCAPTCHA how to make required?

▼魔方 西西 提交于 2019-11-26 08:55:44
Does anyone know how to make the " Google ReCAPTCHA (v2) " be "required" in a form ? I mean no form submission until recaptcha is filled-in? I use ParsleyJs in my form, but didnt find a way to make it work with div s... You have to use the reCaptcha verify response call back. Something like this: <script src='https://www.google.com/recaptcha/api.js?onload=reCaptchaCallback&render=explicit'></script> var RC2KEY = 'sitekey', doSubmit = false; function reCaptchaVerify(response) { if (response === document.querySelector('.g-recaptcha-response').value) { doSubmit = true; } } function

Google ReCAPTCHA how to make required?

大城市里の小女人 提交于 2019-11-26 02:01:14
问题 Does anyone know how to make the \"Google ReCAPTCHA (v2)\" be \"required\" in a form ? I mean no form submission until recaptcha is filled-in? I use ParsleyJs in my form, but didnt find a way to make it work with div s... 回答1: You have to use the reCaptcha verify response call back. Something like this: <script src='https://www.google.com/recaptcha/api.js?onload=reCaptchaCallback&render=explicit'></script> var RC2KEY = 'sitekey', doSubmit = false; function reCaptchaVerify(response) { if