Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Am I able to add a custom message to a rule? #19

Closed
joekrump opened this issue Mar 12, 2015 · 1 comment
Closed

Am I able to add a custom message to a rule? #19

joekrump opened this issue Mar 12, 2015 · 1 comment

Comments

@joekrump
Copy link

I love this library, it is so helpful! However, one thing I would like to be able to do is to add a custom validation message to rules that I list in data-validate. Am able to do this somehow? Something along the lines of data-validate="required(Custom validation message),number(another custom validation message)" or something similar is what I'm hoping to be able to do. If this is not yet a feature, I think it would make a great enhancement.

@MatthewDaniels
Copy link

Hi Joe,

check out the answer I gave to #38 - this shows how to do custom error messages using both data-attributes on the input fields themselves and also with custom rules. If you want you can extend existing rules too, but it may be best to use the prompt method and update your error message display with messages for your specific fields.

cheers,
Matt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants