1.0.1 • Published 7 years ago
enhanced-parameter v1.0.1
enhanced-parameter
Enhanced parameter.
Wrapped node-modules / parameter with additional rules, read node-modules / parameter for more.
Install
$ npm install enhanced-parameter
Usage
const parameter = require('enhanced-parameter')()
const rule = {
datetime: 'iso8601DateTime'
}
const data = {
datetime: '2017-02-22T22:00:00Z'
}
const errors = parameter.validate(rule, data)
Addtional Rules
iso8601Datetime
/ iso8601Datetime
Check valid datetime in ISO8601 format between 1000 and 9999.