validatorjs icon indicating copy to clipboard operation
validatorjs copied to clipboard

A data validation library in JavaScript for the browser and Node.js, inspired by Laravel's Validator.

Results 91 validatorjs issues
Sort by recently updated
recently updated
newest added

I've code this fix to solve this issue ( #413 ), checking if the value passed is not an Array in the `integer`, `digits` and `numeric` rules. And I've added...

#404 bugfix, when default parameter IE 11 was broken

Hey, We've got a data structure (simplified to this) ```js const data = { name: "owen", address: { line_one: "xxx", line_two: null } } validator = new Validator(data, { "address.line_one":...

bug
next

Hi, ```javascript const editLocationFields = { fields: [ 'Calle', 'NumExt', 'NumInt', 'Colonia', 'Indicaciones', 'Tipo', 'lat', 'lng' ], labels: { Tipo: 'Tipo de ubicación', NumExt: 'Número Exterior', NumInt: 'Número Interior', Indicaciones:...

bug
help wanted
next

How can i detect which rule is not passed? ` ``` for (let field in v.errors.all()) { fields.push({ field, value: data[field], message: v.errors.first(field), rule: 'not passed rule' /// what to...

new feature
next

Sample code : `method: 'numeric', description: 'required_with:method|required_if:method,0'` Validations are not triggered when method value is 0.

docs
next

``` Validator.register('fail_array', function(value, requirement, attribute) { return false; }, ':attribute Failed'); var fields = {attr: []} var rules = {attr: 'fail_array'} new Validator(fields, rules); ``` This validation will won't fail....

bug
docs
next

I have an array of boolean. How to validate. var data = { status_array: [true, false, true, false] } var rules = { "status_array": "array|in:true,false", } Please Help How to...

docs
next
info needed
reviewing

Hey, should a string with whitespaces be numeric? When using [numeric function](https://github.com/skaterdav85/validatorjs/blob/master/src/rules.js#L170-L180) it returns `true` ```js function numeric(val) { var num; num = Number(val); // tries to convert value to...

bug
next