validatorjs
validatorjs copied to clipboard
A data validation library in JavaScript for the browser and Node.js, inspired by Laravel's Validator.
after and after_or_equal rules expect params val and req. They actually receive val1, val2 and req. Date comparisons should be based on val1 and val2. https://github.com/skaterdav85/validatorjs/blob/master/src/rules.js
I need to validate a field with `required_if` but with a regex, not `===`. I need something like this: ```js const fields = { foo: 'foo', bar: 'bar' }; const...
I would like both of these rules to kick in for a single field: `field_3: ['required_if:field_1,Y', 'required_if:field_2,N']` If `field_1 === 'Y'` and `field_2 === 'N'`, then I want `field_3` to...
Currently is not possible to validate numeric/integer values and their lengths. Laravel, for example, has digits_between validation rule to handle such validations.
The message passed to validator.register(...) can only have :attribute for use in message rendering. Is it possible to let registered rules get more dynamic attributes like like :value and :other...
Add a basic rule that matches the value of the current field with the value of another field
`min` rule is working wrong for empty strings. Here is an example: ```js import Validator from 'validatorjs' const data = { name: '', surname: '' } const rules = {...
There doesn't seem to be any documentation about how to use the sometimes rule. I've also tried to look at the code but can't really work it out. In laravel...
We would like to use these rules with checkboxes e.g. TextField required if Checkbox checked. However, if we use Boolean values for the Checkboxes they will never validate as the...
- [ ] Create @types - [ ] Consider refactor to ES6 (and possibly TypeScript) - [x] Align with latest Laravel enhancements