Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A simple vladation framework
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
dist
lib
test
.gitignore
LICENSE
README.md
grunt.js
package.json

README.md

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.

Something went wrong with that request. Please try again.