-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
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
validateBeforeSubmitting doesn't allow triggering async validator #109
Comments
Async validators not triggered after inputs changing (this applies to Currently async validators triggered only when you submit the form. |
I can suggest a workaround to use |
Is there a workaround? This is some kind of feature request in my case. It should be nice to have a flag in the settings for that and let the developer decide if the extra load is acceptable or not. |
yeah makes sense to add this flag. I described a workaround above |
thanks, I will try the workaround |
looking forward for the flag in the settings ;-) |
The workaround you proposed works great! Thx .onValidate(async function(event) {
const res = await $.getJSON("member/pseudo_available_service/" + $("#pseudo").val());
if (!res)
this.showErrors({ '#pseudo': 'The pseudo is already used' })
}) However, if you manage to add a flag in the settings to handle that use case in a more "standard" way, I'm most certainly interested. |
Any update, eta on this issue? |
I set validateBeforeSubmitting to true. Thanks to that settings, the synchronous validators do trigger when the field value changes. However, my async validator is not triggered when the field value changed.
Here is my code :
How can I solve this ?
The text was updated successfully, but these errors were encountered: