We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i) i want to check age range from server with $.post action.
ii) Problem : a) if first test is false -wrong date b) and second test is good, c) validator does not reset / perfome test and let form submit
In facts it seems that validation is not processed anymore. Should i reset form validation before ?
iii) addValidator(s) :
-this works fine-
$.formUtils.addValidator({ name : 'checkDateBirthHolderJs', validatorFunction : function(value, $el, config, language, $form) { var age=ageGet(value,'/'); console.log('checkDateBirthHolder='+age); var check=true; if(parseInt(age)<16){ check=false }; if(parseInt(age)>45){ check=false }; return check; }, errorMessage : gloss.badBirthHolder, errorMessageKey: 'badBirthHolder' });
this returns good ajax response but no "re-validation"
$.formUtils.addValidator({ name : 'checkDateBirthHolderAjax', validatorFunction : function(value, $el, config, language, $form) { var csrf=$form.find('#csrf').val(); var check=false; $.post( "/myController/dataCheck/", { csrf:csrf, date_birth:value, ac:'date_birth_holder', i18n:app.i18n }, function(rsp,status) { //console.log(rsp); var data = $.parseJSON(rsp); console.log(data); console.log(check); check=data.valid; console.log(check); //check ok return check; }); return check; }, errorMessage : gloss.badBirthHolder, errorMessageKey: 'badBirthHolder' });
iv) using server leads to same problem.
What's wrong ? Thx for tips & time gh59291
The text was updated successfully, but these errors were encountered:
No branches or pull requests
i) i want to check age range from server with $.post action.
ii) Problem :
a) if first test is false -wrong date
b) and second test is good,
c) validator does not reset / perfome test and let form submit
In facts it seems that validation is not processed anymore.
Should i reset form validation before ?
iii) addValidator(s) :
-this works fine-
this returns good ajax response but no "re-validation"
iv) using server leads to same problem.
What's wrong ?
Thx for tips & time
gh59291
The text was updated successfully, but these errors were encountered: