Open qfox opened 8 years ago
It is necessary;( we need validate fields before submit or diff actions. What do you mean in ajax modifier? @zxqfox can you write example?
@zxqfox ping
@awinogradov pong ^.^
// in code:
field.validate().then();
// in validate:
return $.ajax('/check').then(res => res.ok === true);
This prevention should be placed in ajax modifier, I guess.
https://github.com/bem-contrib/bem-forms/blob/6ea4b060735b017befec473cfd8ac3951b77e316/common.blocks/form/_has-validation/form_has-validation.browser.js#L31