guillaumepotier / validator.js

Powerful objects and strings validation in javascript for Node and the browser
http://validatorjs.org
MIT License
255 stars 39 forks source link

validation from json files #38

Open pleerock opened 9 years ago

pleerock commented 9 years ago

This is a feature request, it would be great if we can apply validation from json files like this:

{
  "name": "question",
  "columns": {
    "title": {
      "not_blank": true,
      "min": "5",
      "max": "50"
    },
    "text": {
      "not_blank": true,
      "min": "5",
      "max": "5000"
    }
  }
}
pleerock commented 9 years ago

and json is the regular javascript object, which means you can implement this configuration to be used from regular javascript object..