Created
August 24, 2012 05:16
-
-
Save Radagaisus/3445735 to your computer and use it in GitHub Desktop.
Express Validator Sugar
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
| pre = (req, fn, next) -> | |
| error_handler = fn() | |
| errors = req.validationErrors() | |
| if errors then error_handler(errors) | |
| else next() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment