poppinss / indicative

Indicative is a simple yet powerful data validator for Node.js and browsers. It makes it so simple to write async validations on nested set of data.
https://indicative.adonisjs.com/
MIT License
417 stars 52 forks source link

Extended rule with camel case always shows default validation message #76

Closed hedlund closed 8 years ago

hedlund commented 8 years ago

Using indicative 2.1.1 via Adonis. It looks like the following bug has appeared again: Issue 34.

I extend the validator with a rule named using camel case, and then use the rule with snake case. The validation itself works as expected, but the default validation message is always displayed. If i remove all camel casing/snake casing, and only use lowercase letters in the name, everything works as it should.

Looking into theMessages/index.js file it looks like the message is stored using the camel case name, but retrieved using the snake case one, which would explain the behaviour...