Last active
December 22, 2015 09:59
-
-
Save wombleton/6455793 to your computer and use it in GitHub Desktop.
This file contains 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 obj = { | |
name: 'Good McGoodson', | |
last_menstrual_period: 41 | |
}; | |
validate(obj, [ "name.length between 1 and 100", "lmp between 0 and 40"]]); // returns ["lmp must be between 0 and 40"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expression parsing vs.
validationMessage
would be automatically created based on the rule, but could be overwritten?