Last active
August 29, 2015 14:02
-
-
Save heymichaelp/0404762f202cbb540b1a to your computer and use it in GitHub Desktop.
Form Object: Example of Complete Form Object API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myController = function(req, res) { | |
var form = new NewStudentForm(req.body).process() | |
if (form.errors.length > 0) { | |
// send the user back to the form | |
} else { | |
// send the user to the success page | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment