You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although the readme specifies that one of the goals is to use the same validation on the server side and on the front-end, I couldn't find anything to accomplish this.
Just like on the backend, where you'd construct a form object, and then call .bind and .handle on it, you can do exactly the same in the frontend.
You definitely shouldn't need all those loops and vars to do it - you should be able to just pass something like $('form').serialize or $('form') or $('form').get(0) into handle.
Currently, it only accepts an object, so you'd need to build one yourself by iterating (not looping) over $('form').serializeArray().
I'll leave this open since forms should in its handle method certainly accept both a jQuery object, and a <form>HTMLElement.
Although the readme specifies that one of the goals is to use the same validation on the server side and on the front-end, I couldn't find anything to accomplish this.
I whipped up my own method, see here:
https://gist.github.com/Xananax/7178b559ba783a97b0a0
Two questions:
The text was updated successfully, but these errors were encountered: