0.0.0 • Published 5 years ago

@validate.it/helpers v0.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

@validate.it/rules

version issues issues completed rules

Installation

// If you are using npm
npm install --save @validate.it/rules

// If you are using yarn
yarn add @validate.it/rules

Rule structure

Validation rules are JS objects containing a message and a check functions.

{
  message: Function (options: Object),
  check: Function (options: Object)
}

Each of these methods accepts an options object containing:

  • value <Any>: value of the field being validated
  • attribute <String>: The name of the validated field
  • data <Object>: object containing all the fields being validated
  • args <Array>: An array containing the options passed to the validation rules in order

Available rules

Version log

  • v0.0.x:

    • Initial commits
    • Created first rules

Author