0.0.4 • Published 11 years ago

vladiator v0.0.4

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

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
  • length
  • gte

License

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

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago