validatorjs
validatorjs copied to clipboard
A data validation library in JavaScript for the browser and Node.js, inspired by Laravel's Validator.
# Feat Error Template Message ## Overview The goal of this PR is to allow access of the input value on the error messages template strings via a `:inputValue` keyword....
I do not know if this is doable currently. I could not find any doc for this. I want the validator to stop immediately when a rule for an attribute...
This is probably related to: https://github.com/skaterdav85/validatorjs/issues/215 If you try to validate an empty array with the `min` rule, it passes instead of returning error. Doing some reverse eng. it seems...
Hi, :sunglasses: I'm create this for cases like text validations as open fields, the alpha rule is insufficient for me, it can be solved with a custom rule obviously, but...
### Situation I'm coding a wrapper to validate some group of fields (like address) that appears in more than one place in the system (to avoid repeated rules) but I...
I'm getting an error with '_getAttributeName' with more than one rule. I've managed to fix it with a simple change: ``` _getAttributeName: function(attribute) { var name = attribute; if (this.attributeNames.hasOwnProperty(attribute))...
The default implementation of the `attributeFormatter` receives the indexed attribute name. For example something like `addresses.5.line_one`. This key is then used to directly fetch a matching value from the `attributeNames`....
I am writing code to validate array of emails and phone numbers as follow ``` var rules = { 'emails[]': 'required_without:phones[]|array', 'emails[].*': 'required|email', 'phones[]': 'required_without:emails[]|array', 'phones[].*': 'required|digits_between:9,10', }; var messages...