require(['jquery'], function ($) {
$('#form-validate-1045043033').on('submit', function() {
var captcha_response = grecaptcha.getResponse();
if(captcha_response.length == 0)
{
// Captcha is not Passed
$('#form-validate-1045043033 #html_element_form-validate-1045043033_field_1670041357').html('
Ce champ est obligatoire.
');
$('#form-validate-1045043033 div.mage-error-custom').attr('style','display:block !important; color:#e02b27; font-size:1.2rem; margin-top:7px;');
return false;
}else{
// Captcha is Passed
$('#form-validate-1045043033 #html_element_form-validate-1045043033_field_1670041357').html('');
return true;
}
});
});