Default values #16
Comments
Great idea! I'll make sure to implement this when I'm back from my vacation On Fri, Dec 26, 2014 at 6:08 PM, tamtakoe notifications@github.com
|
Pushed an implementation of this in d06bd13 Please have a look and see what you think, you can just close the issue if you're satisfied :) |
Good! But it only for error params, not for options (f.e. Using lodash defaults: var defaults = {
presence: ...
...
}
validators.defaults = defaults; //user can change it
...
//presence validator
_.defaults(options, defaults.presence); |
I think it should be possible to set default value of any validator option. So I agree with @tamtakoe 👍 |
Sure, sounds like a resonable feature request. |
Done, now you should be able to specify both default messages and default options. Please try it out and let me know what you think. |
Thanks! 👍 I tried to use default messages and it's working. |
It works! it may be rename Thank you for your work! |
Often I need to set custom
message
(or other fields) for all validators. Now I have to write every time:It is better:
The text was updated successfully, but these errors were encountered: