1.0.6 • Published 3 years ago

illuminate-validator v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Validator

const validator = createValidator({
        data: {
          key: 'my_value'
        },
        rules: {
          key: 'required|string',
        },
        attributes: {
          key: 'custom rename',
        }
      }).validate()


validator.fails
// List error messages
validator.errors().list
validator.errors().any
// Has any key errors
validator.errors().has('key')

Lang available : EN/FR

Tests

Run test => npm run test

Run test with coverage => npm run test-cover

1.0.6

3 years ago

1.0.5

3 years ago