Skip to content
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.

Allow custom messages on numericality options object for each validation #35

Merged
merged 1 commit into from Oct 10, 2015

Conversation

fastestOrange
Copy link

In the same way that I am able to custom validation messages to the length validator options object - for example: (wrongLength, tooLong, tooShort) - I want to add custom messages on the options object to the of numericality validator.

validate.validators.numericality.notGreaterThan sets a default value. I need a custom message which is different for the same validations (numericality, greater than X) but with a completely different message.

Include changes to numericality-spec.js

Totally up for providing examples and text for validate.js documentation if desired.

@ansman ansman changed the title Allow custom messages custom messages on numericality options object for... Allow custom messages on numericality options object for each validation Jul 9, 2015
@ansman
Copy link
Owner

ansman commented Jul 9, 2015

I'm sorry I haven't responded to this yet, it must be slipped between my fingers. I'll review this ASAP, it sounds like a reasonable request.

@ansman ansman added this to the Next milestone Jul 9, 2015
ansman added a commit that referenced this pull request Oct 10, 2015
Allow custom messages on numericality options object for each validation
@ansman ansman merged commit acfadc6 into ansman:master Oct 10, 2015
ansman added a commit that referenced this pull request Oct 10, 2015
@ansman
Copy link
Owner

ansman commented Oct 10, 2015

Released in 0.9.0 and again, sorry for the extremely long waiting time.

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

Successfully merging this pull request may close these issues.

None yet

2 participants