1.1.15 • Published 5 years ago

willy-validation v1.1.15

Weekly downloads
15
License
MIT
Repository
bitbucket
Last release
5 years ago

Validatie

Form validatie script als uitbreiding op https://validatejs.org/

Installatie

npm install willy-validation --save
yarn add willy-validation

Implementatie voorbeeld

import Validate, { ValidationOptions } from 'willy-validation';

const opts: ValidationOptions = {
    validateOnBlur: false
};

const v = new Validate(document.querySelector('form'), opts);
v.validate();

Opties

customLabels

Standaard worden labels automatisch opgebouwd, maar deze zijn te overrulen

customLabels: { original: new }

Default: null

extendedConstraints

Constraints worden automatisch gebouwd, soms wil je deze extenden / overwriten. https://validatejs.org/#constraints

extendedConstraints: {
    'fieldname': {
        presence: true
    }
}

Default: null

locale

Custom locale. Beschikbare locales:

  • en
  • nl

Default: 'en'

validateOnBlur

Moet elk veld gevalideerd worden bij een blur?

Default: true

1.1.15

5 years ago

1.1.14

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.8

5 years ago

1.1.7

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago