-
Notifications
You must be signed in to change notification settings - Fork 39
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
Validation preSubmit and isValid method #31
Comments
Hi @andtankian I believe you are well. The first docs for BunnyJS are Web Standards. You can check if form is valid with native Cheers |
Thank you for replying. The problem I'm having is about the Validation form submit event handler that is calling Do you have any ideas? Thank you very much. |
Thank you for notes. Well, I suppose easiest option in that case would be to add onSubmit(form, promise / callback) method into Validation component and adjust init(). If it's a promise, wait till it's fulfilled. If it's a function, run it immediately. In that case you could add additional actions before form is submitted like animations and you won't need to worry about checking if form is valid since it already is done for you inside if in init(). I am currently unavailable to do so. Maybe you could submit this commit and I would later push it to NPM. Cheers |
By now I'm also not able to perform a validation and send the form via Ajax when form is valid due this implementation detail. Also I didn't understand what you meant on
I've searched on source code but didn't find references to this |
What's up guys?
I couldn't found neither in docs or source code a way to verify if the form is valid.
In fact, I need to do extra things before properly submit the form (like sanitize inputs, made some animations, etc.)
Today, is it possible? Am I missing some method here?
If not, I suggest to implement these methods. It would be very interesting to have these.
Thank you very much.
The text was updated successfully, but these errors were encountered: