vladiator

A simple vladation framework

npm install vladiator
4 downloads in the last week
16 downloads in the last month

vladiator

A simple vladation framework.

Usage

validate(rules, value)

Returns validation object with isValid property and error property.

Arguments

  • rules - array of test methods to apply on value.
  • value - value to be evalutated.

Example

var vladiator = require('vladiator');
var rules = [ 'required', 'string', [ 'length', 10 ]];

//returns { isValid: false, error: 'length' }
vladiator.validate(rules, "keesmann");

Validators

  • required
  • array
  • number
  • string
  • boolean
  • length
  • gte

License

Copyright (c) 2012 August Hovland Licensed under the MIT license.

npm loves you