{"_id":"backbone-validation","_rev":"49-29bc8aad985787a2bfc9b8119ebed70a","name":"backbone-validation","description":"![Version](https://img.shields.io/npm/v/backbone-validation.svg?style=flat) ![Downlodas](https://img.shields.io/npm/dm/backbone-validation.svg?style=flat) ![Dependencies](https://david-dm.org/thedersen/backbone.validation.svg?style=flat) ![license](http:/","dist-tags":{"latest":"0.11.5"},"versions":{"0.1.1":{"name":"backbone-validation","description":"Backbone.Validation.","url":"http://jatek.toolpart.hu","keywords":["backbone","validation"],"author":{"name":"Bika","email":"viktor.nagy@toolpart.hu"},"contributors":[],"dependencies":{"underscore":">=1.3.1","backbone":"0.9.x","node-static":">=0.5.9"},"lib":".","main":"backbone-validation.js","version":"0.1.1","_npmUser":{"name":"akasha","email":"viktor.nagy@gmail.com"},"_id":"backbone-validation@0.1.1","devDependencies":{},"optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.0-2","_nodeVersion":"v0.6.12","_defaultsLoaded":true,"dist":{"shasum":"de38a3e86a5889dbb86e12e828b9f8dc555ee1f4","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.1.1.tgz","integrity":"sha512-Ng2Kl03S0shENkZRxWdQa47t9LUmRZJNV5ujqP3qhf9BRfleFoNg0AW3iYfRDi+c+nVb+49f0fPNZmX4799xiQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDi5HEgzGfnRjifT4znqit4OL3LXWrIuHK9D+vBmqvHygIhAMNQeNOO4XXjLm9qsLAxgMPwgVSyYU5EGxD1R1P1JepW"}]},"scripts":{},"maintainers":[{"name":"akasha","email":"viktor.nagy@gmail.com"}],"directories":{}},"0.6.1":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.6.1","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"git://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dest/backbone-validation-amd.js","dependencies":{"backbone":">=0.9.1","underscore":">=1.3.1"},"devDependencies":{"buster":">=0.6.2","grunt-buster":">=0.1.1"},"_npmUser":{"name":"thedersen","email":"thedersen@gmail.com"},"_id":"backbone-validation@0.6.1","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.24","_nodeVersion":"v0.6.19","_defaultsLoaded":true,"dist":{"shasum":"1d1bfd30a89f078bd8751ae4c99822851cf3c31b","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.6.1.tgz","integrity":"sha512-X7RCyJ5jMTWvYmk4DWM88tegzdwuuaBRNLQjsDk+og4bQXBA2N3mivWKGW/Z7e6BUQIQ6YKFPszfthlfO45O6A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD9B4msP2eCzsdBT3Cb+8PxUmV1ioTtRo0od/ychP2LSgIhAKzkFKMrob1wPZJbu1SlfXkfQ6F/v0Atcd9tn4nhRrGU"}]},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"}]},"0.6.2":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.6.2","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"git://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=0.9.1","underscore":">=1.3.1"},"devDependencies":{"buster":">=0.6.2","grunt-buster":">=0.1.1"},"_npmUser":{"name":"thedersen","email":"thedersen@gmail.com"},"_id":"backbone-validation@0.6.2","optionalDependencies":{},"engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"1.1.24","_nodeVersion":"v0.6.19","_defaultsLoaded":true,"dist":{"shasum":"d06d492d4c9776f11bdc2fe865ca76b78308d329","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.6.2.tgz","integrity":"sha512-Z7lT64iOdZCoKZ+dJ86ba0eODNcDx1UndoZCoRoezXrOWddmXuiOoEIk0hd7RRt+iB1IskSUObCTLoEDYVlWKQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7NHESkRhAxVXigsbC7EAk7CRclun7yao3XpuWwHH1RAIgXdRrJmF5SQszVLGYi418uqcBQYFquSwPwsp5bDb5e88="}]},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"}]},"0.6.3":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.6.3","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=0.9.1","underscore":">=1.3.1"},"devDependencies":{"buster":">=0.6.2","grunt-buster":">=0.1.1"},"_id":"backbone-validation@0.6.3","description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","dist":{"shasum":"68e9c3387f8300b6b0679f505feaf74b9d1e758a","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.6.3.tgz","integrity":"sha512-gxaI+k89EB1w0sKuDj3EaAvlCEm2dt01wiId82mApxXkmDE1haFyemgm/KZm0d/U+voOWgXhptu9F9bonu1oPQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDIXKm6S1WWxp/DFuvGXmjfIlS/or5q3Ojt04x3mPAY7AiEAoYcdOp+S4Vm/OOZ0IW1uGnJ5h///K2v35JNVyxCOPzQ="}]},"_npmVersion":"1.1.63","_npmUser":{"name":"thedersen","email":"thedersen@gmail.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"}]},"0.6.4":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.6.4","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=0.9.1","underscore":">=1.3.1"},"devDependencies":{"buster":">=0.6.2","grunt-buster":">=0.1.1"},"_id":"backbone-validation@0.6.4","description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","dist":{"shasum":"2ee46dfa3231fbfcf4cfaecd6157a3f1b0bcf1b2","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.6.4.tgz","integrity":"sha512-6rROK2mOhpBUIKvbfdNRD7g97GRsbGANLyMzMjZ2ve3FLkTBe1oJlI/LfrjU+pDa/DDElyYZx2vzyQ4H/2LBkA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD+cG53bIsQ60CsLyXBBQXsR/o2t+FjhKHLmXlFvTfe9AIhAOQ8iXIESxS9jn4Ns0sjxN0t46VkAI6g25ckiuYmnD/g"}]},"_npmVersion":"1.1.63","_npmUser":{"name":"thedersen","email":"thedersen@gmail.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"}]},"0.7.0":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.7.0","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=0.9.1","underscore":">=1.3.1"},"devDependencies":{"buster":">=0.6.2","grunt-buster":">=0.1.1"},"_id":"backbone-validation@0.7.0","description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","dist":{"shasum":"76572d56258d9e115f679a91fb206973ad21e793","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.7.0.tgz","integrity":"sha512-IVnyZWpUyrTvlF2uhT+7+ialiHpGXxxIFp1GYJKxgCoAvk4jp/iEQK1h4Y1zeOXYLCbjJYvehgDFDv0mj/Qmvw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB2mCx3wo3U37nyH36KjJtjg7RsStkIBP+oJ6TeEsOOqAiEAzAdK4w9hwTuml+NIx+f/rSkLoFfIuFm4r3kJeQdVd3k="}]},"_npmVersion":"1.1.63","_npmUser":{"name":"thedersen","email":"thedersen@gmail.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"}]},"0.7.1":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.7.1","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=0.9.1","underscore":">=1.3.1"},"devDependencies":{"buster":">=0.6.2","grunt-docco":">=0.1.2","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":">=0.1.1"},"_id":"backbone-validation@0.7.1","description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","dist":{"shasum":"78da09c9f2dd5c52615a1b9747f82dc43b8fbb2e","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.7.1.tgz","integrity":"sha512-525g+AVxmG1dUuUBYasLIB3Efkn0g6bXW9qC96zr/nZXNUtdi7k98F8NHAiRGwpwZpKE0ZMe8bJsgF/SXNwetg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCg34uRAGBsIimiAQJLMY1iVwA4tw44dKw27hcgClGePwIhAIGEkVf8oo13WuatAj6h2/IPq9l7TqVFNa+ww3XXSXOX"}]},"_npmVersion":"1.1.65","_npmUser":{"name":"thedersen","email":"thedersen@gmail.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"}]},"0.8.0":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.8.0","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=0.9.1","underscore":">=1.3.1"},"devDependencies":{"buster":">=0.6.2","grunt-docco":">=0.1.2","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":">=0.1.1"},"_id":"backbone-validation@0.8.0","description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","dist":{"shasum":"62be64443318e2ca2b8b9d80a9b20e5dd08859fc","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.8.0.tgz","integrity":"sha512-q6rOA3s1SdR5C52tsQpX8hJyo+GPg16426Y6Orf8HR81lOvJwsQUDaT9KBABKToY6pROWxEs+S6chcryzpX7yA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGpJ0GZGxTqqV0PQNpvXTBGH9b1tHxWXJvGYuMicKJLnAiEAlNe62v0V+n6uYra3KG/s8Xq/7JNoblNY6C4G6Mzf5fg="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"thedersen","email":"thedersen@gmail.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"}]},"0.8.1":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.8.1","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=0.9.1","underscore":">=1.3.1"},"devDependencies":{"grunt":"~0.4.1","buster":">=0.6.2","grunt-docco":">=0.1.2","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":">=0.1.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","_id":"backbone-validation@0.8.1","dist":{"shasum":"459de63af90a44e74ca8fdb0e573a2f581705b08","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.8.1.tgz","integrity":"sha512-ipeyM0bv1uIjaA8hPvaG3ome29JV0OoHJQhVG2YuF/z9Gbfp9juOOUoAGeEdWjdWKOIdYWJQn4TTUmg/C67VfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC73PuNnfkPjvMcrg+HXHzL+FDhCZ0mAr4ptFwCKrYVoQIhAMIUisf55i/snBBoi0mU6apymW4dTlhekkLYNqhRua5S"}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"thedersen","email":"thedersen@gmail.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"}]},"0.8.2":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.8.2","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=0.9.1","underscore":">=1.3.1"},"devDependencies":{"grunt":"~0.4.1","buster":">=0.6.2","grunt-docco":">=0.1.2","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":">=0.1.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","_id":"backbone-validation@0.8.2","dist":{"shasum":"9ec6fac535e15140774386bde7934e7808a7671d","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.8.2.tgz","integrity":"sha512-3fNah9Ims8DR7sSttBfESi+05lLphRNS3+EY3mMidcJtlnQP59d4bR9b8lqQJKTUXN7XdkvaIelul2KcKEERew==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFyggwpkZhwAcj/10gin6YzfVouUgmQYvfl6rf0jLazVAiBPz4Mbw/sC1gZcf+9ErNlLAK6ryD8foKSSMa8GlLSR3g=="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"thedersen","email":"thedersen@gmail.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"}]},"0.9.0":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.9.0","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=1.0.0","underscore":">=1.4.3"},"devDependencies":{"grunt":"~0.4.1","buster":">=0.6.2","grunt-docco":">=0.3.0","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":">=0.1.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","_id":"backbone-validation@0.9.0","dist":{"shasum":"0460be058f53a05ce32105b2d30b131f11e3dc01","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.9.0.tgz","integrity":"sha512-4e6aBigPnFdfgMbtJR8hB6h24hQ+HEwmpzfxoxG2IgnI8klqMVGTXRpBxuPdY1Ap8YaCV6OCBZ4xMSRHttpSbw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsgcb05rXcS45pd+MXQmoYYoXotvUCh2kRiTm5AFeUyAIgHOVzcRvEpMbB8A5Gs/8Blzw8+T4GSRT0Xk2UGlzNr98="}]},"_from":".","_npmVersion":"1.3.2","_npmUser":{"name":"thedersen","email":"thedersen@gmail.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"}]},"0.9.1":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.9.1","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=1.0.0","underscore":">=1.4.3"},"devDependencies":{"grunt":"~0.4.1","buster":"~0.7.8","grunt-docco":">=0.3.0","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":"~0.3.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","_id":"backbone-validation@0.9.1","dist":{"shasum":"4cf28fd2e1d236e454483b4eb5342a8ece16abc1","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.9.1.tgz","integrity":"sha512-bUdbJ8S3BvdLqxM8ndsaVXFNOa13W2ODCH0pQ9qYSRvFwEMehKn2edzeJgKyoS9trWcI0F94t7hpFL/7HzoY3A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpIK9UHZk3Y39i4irkOF0NevRF6n70wZzkGpdiof87eAIgCXba04zYuiIvy8VDa1Goz5RU9H4LX4nH7dt00d2iTEw="}]},"_from":".","_npmVersion":"1.3.21","_npmUser":{"name":"thedersen","email":"thedersen@gmail.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"}]},"0.9.2":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.9.2","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=1.0.0","underscore":">=1.4.3"},"devDependencies":{"grunt":"~0.4.1","buster":"~0.7.8","grunt-docco":">=0.3.0","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":"~0.3.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"gitHead":"b75317aa3604d68818b2facc7a8005253d9dd0fe","description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","_id":"backbone-validation@0.9.2","_shasum":"75fc8faf721c1e73ec5714df34568a8aac6848dd","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"chiefgui","email":"guilherme@oderdenge.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"},{"name":"chiefgui","email":"guilherme@oderdenge.com"}],"dist":{"shasum":"75fc8faf721c1e73ec5714df34568a8aac6848dd","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.9.2.tgz","integrity":"sha512-QvIpY8LsV6Eiqlx8ARPncWHcgmWYveFf4SkkG20tS1qZUtz8lnqveZwttKbJl8C2m1x2DTZ9a34GH1bWjpy6jw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH/FSFgXwjOCpTbi6K1Tif1+JJBDdv05Cu4sFRW2s7+PAiA5WjfOAD15krDCdLNVanMoAP4Y968BMjy0rNGleV+Lgw=="}]}},"0.10.0":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.10.0","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=1.0.0","underscore":">=1.4.3"},"devDependencies":{"grunt":"~0.4.1","buster":"~0.7.8","grunt-docco":">=0.3.0","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":"~0.3.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"gitHead":"093af8d961011da150379cbfc482d72af996f3dd","description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","_id":"backbone-validation@0.10.0","_shasum":"fb866892f98dcf9fc95bf40b1465e606478868fb","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"chiefgui","email":"guilherme@oderdenge.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"},{"name":"chiefgui","email":"guilherme@oderdenge.com"}],"dist":{"shasum":"fb866892f98dcf9fc95bf40b1465e606478868fb","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.10.0.tgz","integrity":"sha512-f15SXbNXpY8QYvJYGU6Yhf0PhmC8/iWefjfO07NUJWuvBWTSFSGU9mwwBKaoFKOFZfenifgVhcLW4Afscby1LQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH0/QJZr3c+UeYWbHyYeffqlK/bKSO/xg0YbrONjQPVlAiBfnr37SRD8/o48mioprWee44/p4wSI5vvVdUm+e5UBHw=="}]}},"0.10.1":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.10.1","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=1.0.0","underscore":">=1.4.3"},"devDependencies":{"grunt":"~0.4.1","buster":"~0.7.8","grunt-docco":">=0.3.0","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":"~0.3.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"gitHead":"8b1a7fb2b31a9b0172f9f7c0f7c83ca66387501b","description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","_id":"backbone-validation@0.10.1","_shasum":"ef92cb6ff5163e7106fa7a9aa1b09609e2ea4b62","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"chiefgui","email":"guilherme@oderdenge.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"},{"name":"chiefgui","email":"guilherme@oderdenge.com"}],"dist":{"shasum":"ef92cb6ff5163e7106fa7a9aa1b09609e2ea4b62","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.10.1.tgz","integrity":"sha512-7Bm+FGa4/Brc3SaHGjtFGIkeryFSt3t0Q8iJQC58O0wlYeoKGTeBtOeJI7XyAJJrGfh3AyWCp22Orf/q5b9V8w==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJo4dlWigFob2nesQkduMX073yaEE7gSnlSGFChUamiAIhAKZLlJEfo5cHA0v7E92YKyESVBX4mNtORt10NDefntyr"}]}},"0.11.0":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.11.0","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=1.0.0","underscore":">=1.4.3"},"devDependencies":{"grunt":"~0.4.1","buster":"~0.7.8","grunt-docco":">=0.3.0","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":"~0.3.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"gitHead":"8712ac3d450d320cf9c9eb4335741c64c7ad5ba8","description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","_id":"backbone-validation@0.11.0","_shasum":"439bd928a7b3837cb66e08cef9263e8d0eead3bd","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"chiefgui","email":"guilherme@oderdenge.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"},{"name":"chiefgui","email":"guilherme@oderdenge.com"}],"dist":{"shasum":"439bd928a7b3837cb66e08cef9263e8d0eead3bd","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.11.0.tgz","integrity":"sha512-HBwSAoBW9eKkz/FVVACiRict81lyonsu6PQ/sxV+7UUeKUADU6oDJ/ehr9eoVGrpnIxquhiJZBnWf9t8bZni/Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTFubEWkzktUlMjaGkdxCbXRHX86lWKlFkdiMgs6a+GQIgaETJlrv1hcxEhuE0m/GfigtCcNS1mbGW35YXIIR0X14="}]}},"0.11.1":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.11.1","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=1.0.0","underscore":">=1.4.3"},"devDependencies":{"grunt":"~0.4.1","buster":"~0.7.8","grunt-docco":">=0.3.0","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":"~0.3.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"gitHead":"d34984b2c900bb8259f09981a72dc20aa476f780","description":"A validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.","_id":"backbone-validation@0.11.1","_shasum":"becb1b7371654ed524f89357291e1c17a8aeb127","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"chiefgui","email":"guilherme@oderdenge.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"},{"name":"chiefgui","email":"guilherme@oderdenge.com"}],"dist":{"shasum":"becb1b7371654ed524f89357291e1c17a8aeb127","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.11.1.tgz","integrity":"sha512-KztFDm/0Nnr+JAJ9gLmHsCkoygpHgJcsPcz4ABcLu+LfqHU2QtKfyVIldZA2mYNE1Gf98IdUPWwIV3ZDOEBQCQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCN2RWvVaJ/y71KNaO7bhdprWnzj+N+bahQCUhKmlvnwIgVr0tMINsIoI0gC/uShyB5q3TfCIohky6KKpIJmJZprk="}]}},"0.11.2":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.11.2","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=1.0.0","underscore":">=1.4.3"},"devDependencies":{"grunt":"~0.4.1","buster":"~0.7.8","grunt-docco":">=0.3.0","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":"~0.3.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"gitHead":"52fd932ed0f2561da02fc52d50afb31c85c57fd0","description":"![Version](https://img.shields.io/npm/v/backbone-validation.svg?style=flat) ![Downlodas](https://img.shields.io/npm/dm/backbone-validation.svg?style=flat) ![Dependencies](https://david-dm.org/thedersen/backbone.validation.svg?style=flat) ![license](http:/","_id":"backbone-validation@0.11.2","_shasum":"04ac5230db63caa835ffbd5fe52b97961f635e48","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"chiefgui","email":"guilherme@oderdenge.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"},{"name":"chiefgui","email":"guilherme@oderdenge.com"}],"dist":{"shasum":"04ac5230db63caa835ffbd5fe52b97961f635e48","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.11.2.tgz","integrity":"sha512-jAwW6TM3msWKAlcM8Cn+fZm2ILRsmgBW0Rcz1TMDSZWkb2+7u9ljm8njkxRThEp6naa8SENrn7JljABehqsRiQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHcfNpHAHhsGCXmQyRscUy/HDDYAxtAKOA7KNWaMJt3BAiEAoIH84IORrQj3GO+D+16zXDg3eLOSvc3F0bg+DSBxyPk="}]}},"0.11.3":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.11.3","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=1.0.0","underscore":">=1.4.3"},"devDependencies":{"grunt":"~0.4.1","buster":"~0.7.8","grunt-docco":">=0.3.0","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":"~0.3.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"gitHead":"6b0d3e39e91bc02ff45dd1c17ecfdbef1e839fe1","description":"![Version](https://img.shields.io/npm/v/backbone-validation.svg?style=flat) ![Downlodas](https://img.shields.io/npm/dm/backbone-validation.svg?style=flat) ![Dependencies](https://david-dm.org/thedersen/backbone.validation.svg?style=flat) ![license](http:/","_id":"backbone-validation@0.11.3","_shasum":"fc0d9d0160b4d91ffd95859f9a1cc2f308b2b98c","_from":".","_npmVersion":"2.0.2","_nodeVersion":"0.10.32","_npmUser":{"name":"chiefgui","email":"guilherme@oderdenge.com"},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"},{"name":"chiefgui","email":"guilherme@oderdenge.com"}],"dist":{"shasum":"fc0d9d0160b4d91ffd95859f9a1cc2f308b2b98c","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.11.3.tgz","integrity":"sha512-zF5+ZGvkuRZBvTTsULemdwCDV4/h1favE3ZHuYN8fzqinUekC+vYKIA2EJbnlRUW8znkjY168undYPIL3drT5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDsWfNLB5OiK0ggE5/QrEBOCI1fqMdNScj5LCpq/Y8NKQIgNfJx/g5K+ZxCQHgTq9RepZL/TSdPXdBWUwpHliKhRL0="}]}},"0.11.4":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.11.4","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=1.0.0","underscore":">=1.4.3"},"devDependencies":{"grunt":"~0.4.1","buster":"~0.7.8","grunt-docco":">=0.3.0","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":"~0.3.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"gitHead":"05078b79f1cf7ebe00ea4f7249f0af13f288139a","description":"![Version](https://img.shields.io/npm/v/backbone-validation.svg?style=flat) ![Downlodas](https://img.shields.io/npm/dm/backbone-validation.svg?style=flat) ![Dependencies](https://david-dm.org/thedersen/backbone.validation.svg?style=flat) ![license](http:/","_id":"backbone-validation@0.11.4","_shasum":"ae6539038b613ab769fb4180bdddc88a519e09d5","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"chiefgui","email":"guilherme@oderdenge.com"},"dist":{"shasum":"ae6539038b613ab769fb4180bdddc88a519e09d5","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.11.4.tgz","integrity":"sha512-+xWOFnkz2W3rDaAOmpeVgKbrXJlfvV5YVHyqF0ZQrCTIEC+HDqWtV3s/fVynXDAw2EtcKLNd5SovEP0FeKBTzA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFBqSgcGVAKtWvM2KQpuVn8yLbkqG+vm4wV3F223dYkjAiAlBieWqQOV9+tyZzYzeH8Bj+FFfoJUPtfDl92FPVX6bw=="}]},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"},{"name":"chiefgui","email":"guilherme@oderdenge.com"}]},"0.11.5":{"name":"backbone-validation","title":"Backbone.Validation","version":"0.11.5","author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"homepage":"http://thedersen.com/projects/backbone-validation","licenses":[{"type":"MIT","url":"http://thedersen.mit-license.org/"}],"bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"directories":{"lib":"./dist"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"scripts":{"test":"grunt buster","prepublish":"grunt"},"main":"./dist/backbone-validation-amd.js","dependencies":{"backbone":">=1.0.0","underscore":">=1.4.3"},"devDependencies":{"grunt":"~0.4.1","buster":"~0.7.8","grunt-docco":">=0.3.0","grunt-shell":">=0.1.3","grunt-rigger":">=0.3.0","grunt-buster":"~0.3.1","grunt-contrib-jshint":"~0.6.0","grunt-contrib-uglify":"~0.2.2"},"gitHead":"d76a3366f17dbbddb2b5af8e2389e17bbbd56e3f","description":"![Version](https://img.shields.io/npm/v/backbone-validation.svg?style=flat) ![Downlodas](https://img.shields.io/npm/dm/backbone-validation.svg?style=flat) ![Dependencies](https://david-dm.org/thedersen/backbone.validation.svg?style=flat) ![license](http:/","_id":"backbone-validation@0.11.5","_shasum":"504bfb0079e5673e6a4c4beafbbea1d2f3987244","_from":".","_npmVersion":"2.5.1","_nodeVersion":"0.12.0","_npmUser":{"name":"chiefgui","email":"guilherme@oderdenge.com"},"dist":{"shasum":"504bfb0079e5673e6a4c4beafbbea1d2f3987244","tarball":"https://registry.npmjs.org/backbone-validation/-/backbone-validation-0.11.5.tgz","integrity":"sha512-ha7Aj93q/RBY0vtpDhfoL0fhVHsEK9Ryt9k+5PQqgnaKru+7SyqZ+HrwebUvYaDwnWNeB4UMvwqShQuKMMkXVQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG0o6HPdoM8RegysLzy3ID9B16LNU4g2DY8J8cFJF/l0AiBIJCGtdMar4tdPCEtbO7b95oo+mzWfDCKuPmemZ3fxyQ=="}]},"maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"},{"name":"chiefgui","email":"guilherme@oderdenge.com"}]}},"readme":"# Backbone.Validation\n\n![Version](https://img.shields.io/npm/v/backbone-validation.svg?style=flat)\n![Downlodas](https://img.shields.io/npm/dm/backbone-validation.svg?style=flat)\n![Dependencies](https://david-dm.org/thedersen/backbone.validation.svg?style=flat)\n![license](http://img.shields.io/npm/l/backbone.validation.svg?style=flat)\n[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/thedersen/backbone.validation?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)\n\nA validation plugin for [Backbone.js](http://documentcloud.github.com/backbone) that validates both your model as well as form input.\n\n## Introduction\n\nGood client side validation is an important part of giving your users a great experience when they visit your site. Backbone provides a [validate](http://backbonejs.org/#Model-validate) method, but it is left undefined and it is up to you to override it with your custom validation logic. Too many times I have seen validation implemented as lots of nested ifs and elses. This quickly becomes a big mess. One other thing is that with libraries like Backbone, you hold your state in a Model, and don't tie it to the DOM. Still, when validating your models you probably want to inform your users about errors etc., which means modifying the DOM.\n\nBackbone.Validation tries to solve both these problems. It gives you a simple, extensible way of declaring validation rules on your model, and overrides Backbone's validate method behind the scene. And, it gives you a nice hook where you can implement your own way of showing the error messages to your user.\n\nIf you are using node.js on the server you can also reuse your models and validation on the server side. How cool is that?\n\nBackbone.Validation is a bit opinionated, meaning that you have to follow some conventions in order for it to work properly.\n\n## Download and source code\n\nYou can download the raw source from [GitHub](http://github.com/thedersen/backbone.validation), see the [annotated source](http://thedersen.com/projects/backbone-validation/docs) or use the links below for the latest stable version.\n\n#### Standard builds\n\n* Development: [backbone-validation.js](https://raw.github.com/thedersen/backbone.validation/master/dist/backbone-validation.js) *22.7kb*\n* Production:  [backbone-validation-min.js](https://raw.github.com/thedersen/backbone.validation/master/dist/backbone-validation-min.js) *2.7kb gzipped*\n\n#### AMD builds\n\n* Development: [backbone-validation-amd.js](https://raw.github.com/thedersen/backbone.validation/master/dist/backbone-validation-amd.js) *24.2kb*\n* Production:  [backbone-validation-amd-min.js](https://raw.github.com/thedersen/backbone.validation/master/dist/backbone-validation-amd-min.js) *2.8kb gzipped*\n\n#### Node.js builds\n\n    npm install backbone-validation\n\n#### Bower builds\n\n    bower install backbone-validation\n\n## Getting started\n\nIt's easy to get up and running. You only need to have Backbone (including underscore.js) in your page before including the Backbone.Validation plugin. If you are using the default implementation of the callbacks, you also need to include jQuery.\n\nThe plugin is tested with, and should work with the following versions of\n\n* Backbone >= 1.0.0\n* Underscore >= 1.4.3\n\n### Configure validation rules on the Model\n\nTo configure your validation rules, simply add a validation property with a property for each attribute you want to validate on your model. The validation rules can either be an object with one of the built-in validators or a combination of two or more of them, or a function where you implement your own custom validation logic.\n\nValidating complex objects is also supported. To configure validation rules for objects, use dot notation in the name of the attribute, e.g `'address.street'`.\n\n#### Example\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    name: {\n      required: true\n    },\n    'address.street': {\n      required: true\n    },\n    'address.zip': {\n      length: 4\n    },\n    age: {\n      range: [1, 80]\n    },\n    email: {\n      pattern: 'email'\n    },\n    someAttribute: function(value) {\n      if(value !== 'somevalue') {\n        return 'Error message';\n      }\n    }\n  }\n});\n\n// validation attribute can also be defined as a function returning a hash\nvar SomeModel = Backbone.Model.extend({\n  validation: function() {\n    return {\n      name: {\n        required: true\n      }\n    }\n  }\n});\n```\n\nSee the **[built-in validators](#built-in-validators)** section for a list of the validators and patterns that you can use.\n\n### Specifying error messages\n\nBackbone.Validation comes with a set of default error messages. If you don't like to use those, you can either [override them](#extending-backbone-validation/overriding-the-default-error-messages), or you can specify error messages where you declare validation rules on the model.\n\nYou can specify an error message per attribute by adding a `msg` property like this:\n\n```js\nMyModel = Backbone.Model.extend({\n  validation: {\n    email: {\n      required: true,\n      pattern: 'email',\n      msg: 'Please enter a valid email'\n    }\n  }\n});\n```\n\nOr, you can specify an error message per validator, by adding an array of validators like this:\n\n```js\nMyModel = Backbone.Model.extend({\n  validation: {\n    email: [{\n      required: true,\n      msg: 'Please enter an email address'\n    },{\n      pattern: 'email',\n      msg: 'Please enter a valid email'\n    }]\n  }\n});\n```\n\nThe `msg` property can also be a function returning a string.\n\n## Using form+model validation\n\nThe philosophy behind this way of using the plugin, is that you should be able to reuse your validation rules both to validate your model and to validate form input, as well as providing a simple way of notifying users about errors when they are populating forms.\n\nNote that Backbone.Validation does not provide any automatic/two-way binding between your model and the view, that's up you to implement (you can for instance use [Backbone.stickit](http://nytimes.github.com/backbone.stickit/)).\n\nBefore you can start using form validation, you need to bind your view.\n\n### Validation binding\n\nThe validation binding code is executed with a call to `Backbone.Validation.bind(view)`. There are several places that it can be called from, depending on your circumstances, but it must be called after your model or collection has been initialized.\n\n```js\n// Binding when rendering\nvar SomeView = Backbone.View.extend({\n  render: function(){\n    Backbone.Validation.bind(this);\n  }\n});\n\n// Binding when initializing\nvar SomeView = Backbone.View.extend({\n  initialize: function(){\n    Backbone.Validation.bind(this);\n  }\n});\n\n// Binding from outside a view\nvar SomeView = Backbone.View.extend({\n});\nvar someView = new SomeView({model: new SomeModel()});\nBackbone.Validation.bind(someView);\n\n// Binding to a view with an optional model\nvar myModel = new Backbone.Model();\nvar SomeView = Backbone.View.extend({\n  initialize: function(){\n    Backbone.Validation.bind(this, {\n      model: myModel\n    });\n  }\n});\n\n// Binding to a view with an optional collection\nvar myCollection = new Backbone.Collection();\nvar SomeView = Backbone.View.extend({\n  initialize: function(){\n    Backbone.Validation.bind(this, {\n      collection: myCollection\n    });\n  }\n});\n```\n\n### Binding to view with a model\n\nFor this to work, your view must have an instance property named *model* that holds your model before you perform the binding, or you can pass an optional model in the options as shown in the example above.\n\nWhen binding to a view with a model, Backbone's [validate](http://documentcloud.github.com/backbone/#Model-validate) method on the model is overridden to perform the validation. In addition, the model's [isValid](http://backbonejs.org/#Model-isValid) method is also overridden to provide some extra functionality.\n\n### Binding multiple views to same model\n\nIt is possible to bind several views to the same model. This is specially useful in UI structures where forms are made with components that share models.\n\nWhen the model is validated all associated views with attributes from that model will validate its related elements.\n\nIt is also possible to unbind each view separately without affecting other bindings.\n\n### Binding to view with a collection\n\nFor this to work, your view must have an instance property named *collection* that holds your collection before you perform the binding, or you can pass an optional collection in the options as shown in the example above.\n\nWhen binding to a view with a collection, all models in the collection are bound as described previously. When you are adding or removing models from your collection, they are bound/unbound accordingly.\n\nNote that if you add/remove models with the silent flag, they will not be bound/unbound since there is no way of knowing the the collection was modified.\n\n### Unbinding\n\nIf you want to remove the validation binding, this is done with a call to `Backbone.Validation.unbind(view)`. This removes the validation binding on the model, or all models if you view contains a collection, as well as removing all events hooked up on the collection.\n\nNote that if you are binding to an optional model or collection, you must also specify this when unbinding: `Backbone.Validation.unbind(view, {model: boundModel})`.\n\n## Using model validation\n\nThe philosophy behind this way of using the plugin, is to give you an easy way to implement validation across *all* your models without the need to bind to a view. Of course, if you use this option the callbacks to update the view is not executed, since there is no way of knowing what view a model belongs to.\n\n### Validation mix-in\n\nTo add validation to your models, mix in the validation on the Model's prototype.\n\n```js\n_.extend(Backbone.Model.prototype, Backbone.Validation.mixin);\n```\n\n## Using server validation\n\nIf you are using node.js on your server, you can also reuse your models and validation on the server. For this to work you must share your models between the server and the client.\n\n```js\nvar backbone = require('backbone'),\n    _ = require('underscore'),\n    validation = require('backbone-validation');\n\n_.extend(backbone.Model.prototype, validation.mixin);\n```\n\n## Methods\n\n### validate\n\nThis is called by Backbone when it needs to perform validation. You can also call it manually without any parameters to validate the entire model.\n\n### isValid\n\nCheck to see if an attribute, an array of attributes or the entire model is valid.\n\n`isValid` returns `undefined` when no validation has occurred and the model has validation (except with Backbone v0.9.9 where validation is called from the constructor), otherwise, `true` or `false`.\n\nIf you don't pass an argument, the properties defined by the `attributes` bind option will be validated. If no `attributes` option is used there will be no validation.\n\n```js\nvar isValid = model.isValid();\n```\n\nIf you pass `true` as an argument, this will force a validation before the result is returned:\n\n```js\nvar isValid = model.isValid(true);\n```\n\nIf you pass the name of an attribute or an array of names, you can check whether or not the attributes are valid:\n\n```js\n// Check if name is valid\nvar isValid = model.isValid('name');\n\n// Check if name and age are valid\nvar isValid = model.isValid(['name', 'age']);\n```\n\n### preValidate\n\nSometimes it can be useful to check (for instance on each key press) if the input is valid - without changing the model - to perform some sort of live validation. You can execute the set of validators for an attribute, or a hash of attributes, by calling the `preValidate` method and pass it the name of the attribute and the value to validate, or a hash of attributes.\n\nIf the value is not valid, the error message is returned (truthy), otherwise it returns a falsy value.\n\n```js\n// Validate one attribute\n// The `errorsMessage` returned is a string\nvar errorMessage = model.preValidate('attributeName', 'Value');\n\n// Validate a hash of attributes\n// The errors object returned is a key/value pair of attribute name/error, e.g\n// {\n//   name: 'Name is required',\n//   email: 'Email must be a valid email'\n// }\nvar errors = model.preValidate({name: 'value', email: 'foo@example.com'});\n```\n\n## Configuration\n\n### Callbacks\n\nThe `Backbone.Validation.callbacks` contains two methods: `valid` and `invalid`. These are called after validation of an attribute is performed when using form validation.\n\nThe default implementation of `invalid` tries to look up an element within the view with an name attribute equal to the name of the attribute that is validated. If it finds one, an `invalid` class is added to the element as well as a `data-error` attribute with the error message. The `valid` method removes these if they exists.\n\nThe implementation is a bit naïve, so I recommend that you override it with your own implementation\n\nglobally:\n\n```js\n_.extend(Backbone.Validation.callbacks, {\n  valid: function(view, attr, selector) {\n    // do something\n  },\n  invalid: function(view, attr, error, selector) {\n    // do something\n  }\n});\n```\n\nor, per view when binding:\n\n```js\nvar SomeView = Backbone.View.extend({\n  render: function(){\n    Backbone.Validation.bind(this, {\n      valid: function(view, attr) {\n        // do something\n      },\n      invalid: function(view, attr, error) {\n        // do something\n      }\n    });\n  }\n});\n```\n\n### Selector\n\n*Default: name*\n\nThis configures what selector that will be used to look up a form element in the view. By default it uses *name*, but if you need to look up elements by class name or id instead, there are two ways to configure this.\n\nYou can configure it globally by calling:\n\n```js\nBackbone.Validation.configure({\n  selector: 'class'\n});\n```\n\nOr, you can configure it per view when binding:\n\n```js\nBackbone.Validation.bind(this.view, {\n  selector: 'class'\n});\n```\n\nIf you have set the global selector to class, you can of course set the selector to name or id on specific views.\n\n### Force update\n\n*Default: false*\n\nSometimes it can be useful to update the model with invalid values. Especially when using automatic modelbinding.\n\nYou can turn this on globally by calling:\n\n```js\nBackbone.Validation.configure({\n  forceUpdate: true\n});\n```\n\nOr, you can turn it on per view when binding:\n\n```js\nBackbone.Validation.bind(this.view, {\n  forceUpdate: true\n});\n```\n\nOr, you can turn it on for one set operation only (Backbone.VERSION >= 0.9.1 only):\n\n```js\nmodel.set({attr: 'invalidValue'}, {\n  forceUpdate: true\n});\n```\n\nNote that when switching this on, Backbone's error event is no longer triggered.\n\n### Label formatter\n\n*Default: sentenceCase*\n\nLabel formatters determines how an attribute name is transformed before it is displayed in an error message.\n\nThere are three options available:\n\n* 'none': Just returns the attribute name without any formatting\n* 'sentenceCase': Converts `attributeName` or `attribute_name` to Attribute name\n* 'label': Looks for a label configured on the model and returns it. If none found, sentenceCase is applied.\n\n```js\nvar Model = Backbone.Model.extend({\n  validation: {\n    someAttribute: {\n      required: true\n    }\n  },\n\n  labels: {\n    someAttribute: 'Custom label'\n  }\n});\n```\n\nTo configure which one to use, set the labelFormatter options in configure:\n\n```js\nBackbone.Validation.configure({\n  labelFormatter: 'label'\n});\n```\n\n### Attributes\n\nThe `attributes` option passed in Backbone.Validation.bind determines what model attributes must be validated. It can be an array, a function returning an array or an string that points to an registered attribute loader. By default, the 'inputNames' attribute loader is provided. It returns the name attribute of input elements in the view.\n\nPer view when binding:\n\n```js\nvar SomeView = Backbone.View.extend({\n  render: function(){\n    Backbone.Validation.bind(this, {\n        attributes: function(view) {\n          return ['name', 'age']; // only name and age will be validated\n        }\n      }\n    });\n  }\n});\n```\n\nSet default globally:\n\n```js\nBackbone.Validation.configure({\n  attributes: 'inputNames' // returns the name attributes of bound view input elements\n});\n```\n\nRegister an attribute loader:\n\n```js\n_.extend(Backbone.Validation.attributeLoaders, {\n  myLoader: function(view) {\n    // return an array with the attributes to be validated\n  }\n});\n```\n\n## Events\n\nAfter validation is performed, the model will trigger some events with the result of the validation.\n\nNote that the events reflects the state of the model, not only the current operation. So, if for some reason your model is in an invalid state and you set a value that is valid, `validated:invalid` will still be triggered, not `validated:valid`.\n\nThe `errors` object passed with the invalid events is a key/value pair of attribute name/error.\n\n```js\n{\n  name: 'Name is required',\n  email: 'Email must be a valid email'\n}\n```\n\n### validated\n\nThe `validated` event is triggered after validation is performed, either it was successful or not. `isValid` is `true` or `false` depending on the result of the validation.\n\n```js\nmodel.bind('validated', function(isValid, model, errors) {\n  // do something\n});\n```\n\n### validated:valid\n\nThe `validated:valid` event is triggered after a successful validation is performed.\n\n```js\nmodel.bind('validated:valid', function(model) {\n  // do something\n});\n```\n\n### validated:invalid\n\nThe `validated:invalid` event is triggered after an unsuccessful validation is performed.\n\n```js\nmodel.bind('validated:invalid', function(model, errors) {\n  // do something\n});\n```\n\n## Built-in validators\n\n### method validator\n\nLets you implement a custom function used for validation.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    name: function(value, attr, computedState) {\n      if(value !== 'something') {\n        return 'Name is invalid';\n      }\n    }\n  }\n});\n\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    name: {\n      fn: function(value, attr, computedState) {\n        if(value !== 'something') {\n          return 'Name is invalid';\n        }\n      }\n    }\n  }\n});\n```\n\n### named method validator\n\nLets you implement a custom function used for validation.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    name: 'validateName'\n  },\n  validateName: function(value, attr, computedState) {\n    if(value !== 'something') {\n      return 'Name is invalid';\n    }\n  }\n});\n\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    name: {\n      fn: 'validateName'\n    }\n  },\n  validateName: function(value, attr, computedState) {\n    if(value !== 'something') {\n      return 'Name is invalid';\n    }\n  }\n});\n```\n\n### required\n\nValidates if the attribute is required or not.\nThis can be specified as either a boolean value or a function that returns a boolean value.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    name: {\n      required: true | false\n    }\n  }\n});\n\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    name: {\n      required: function(value, attr, computedState) {\n        return true | false;\n      }\n    }\n  }\n});\n```\n\n### acceptance\n\nValidates that something has to be accepted, e.g. terms of use. `true` or 'true' are valid.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    termsOfUse: {\n      acceptance: true\n    }\n  }\n});\n```\n\n### min\n\nValidates that the value has to be a number and equal to or greater than the min value specified.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    age: {\n      min: 1\n    }\n  }\n});\n```\n\n### max\n\nValidates that the value has to be a number and equal to or less than the max value specified.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n      age: {\n      max: 100\n    }\n  }\n});\n```\n\n### range\n\nValidates that the value has to be a number and equal to or between the two numbers specified.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    age: {\n      range: [1, 10]\n    }\n  }\n});\n```\n\n### length\n\nValidates that the value has to be a string with length equal to the length value specified.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    postalCode: {\n      length: 4\n    }\n  }\n});\n```\n\n### minLength\n\nValidates that the value has to be a string with length equal to or greater than the min length value specified.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    password: {\n      minLength: 8\n    }\n  }\n});\n```\n\n### maxLength\n\nValidates that the value has to be a string with length equal to or less than the max length value specified.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    password: {\n      maxLength: 100\n    }\n  }\n});\n```\n\n### rangeLength\n\nValidates that the value has to be a string and equal to or between the two numbers specified.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    password: {\n      rangeLength: [6, 100]\n    }\n  }\n});\n```\n\n### oneOf\n\nValidates that the value has to be equal to one of the elements in the specified array. Case sensitive matching.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    country: {\n      oneOf: ['Norway', 'Sweeden']\n    }\n  }\n});\n```\n\n### equalTo\n\nValidates that the value has to be equal to the value of the attribute with the name specified.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    password: {\n      required: true\n    },\n    passwordRepeat: {\n      equalTo: 'password'\n    }\n  }\n});\n```\n\n### pattern\n\nValidates that the value has to match the pattern specified. Can be a regular expression or the name of one of the built in patterns.\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    email: {\n      pattern: 'email'\n    }\n  }\n});\n```\nThe built-in patterns are:\n\n* number - Matches any number (e.g. -100.000,00)\n* email - Matches a valid email address (e.g. mail@example.com)\n* url - Matches any valid url (e.g. http://www.example.com)\n* digits - Matches any digit(s) (i.e. 0-9)\n\nSpecify any regular expression you like:\n\n```js\nvar SomeModel = Backbone.Model.extend({\n  validation: {\n    email: {\n      pattern: /^sample/\n    }\n  }\n});\n```\n\n## Extending Backbone.Validation\n\n### Adding custom validators\n\nIf you have custom validation logic that are used several places in your code, you can extend the validators with your own. And if you don't like the default implementation of one of the built-ins, you can override it.\n\n```js\n_.extend(Backbone.Validation.validators, {\n  myValidator: function(value, attr, customValue, model) {\n    if(value !== customValue){\n      return 'error';\n    }\n  },\n  required: function(value, attr, customValue, model) {\n    if(!value){\n      return 'My version of the required validator';\n    }\n  },\n});\n\nvar Model = Backbone.Model.extend({\n  validation: {\n    age: {\n      myValidator: 1 // uses your custom validator\n    }\n  }\n});\n```\n\nThe validator should return an error message when the value is invalid, and nothing (`undefined`) if the value is valid. If the validator returns `false`, this will result in that all other validators specified for the attribute is bypassed, and the attribute is considered valid.\n\n### Adding custom patterns\n\nIf you have custom patterns that are used several places in your code, you can extend the patterns with your own. And if you don't like the default implementation of one of the built-ins, you can override it.\n\nRemember to also provide a default error message for it.\n\n```js\n_.extend(Backbone.Validation.patterns, {\n  myPattern: /my-pattern/,\n  email: /my-much-better-email-regex/\n});\n\n_.extend(Backbone.Validation.messages, {\n  myPattern: 'This is an error message'\n});\n\nvar Model = Backbone.Model.extend({\n  validation: {\n    name: {\n      pattern: 'myPattern'\n    }\n  }\n});\n```\n\n### Overriding the default error messages\n\nIf you don't like the default error messages you can easilly customize them by override the default ones globally:\n\n```js\n_.extend(Backbone.Validation.messages, {\n  required: 'This field is required',\n  min: '{0} should be at least {1} characters'\n});\n```\n\nThe message can contain placeholders for arguments that will be replaced:\n\n* `{0}` will be replaced with the [formatted name](#configuration/label-formatter) of the attribute being validated\n* `{1}` will be replaced with the allowed value configured in the validation (or the first one in a range validator)\n* `{2}` will be replaced with the second value in a range validator\n\n## Examples\n\n* [Example 1:](http://jsfiddle.net/thedersen/udXL5/) Uses jQuery.serializeObject to serialize the form and set all data on submit\n* [Example 2:](http://jsfiddle.net/thedersen/c3kK2/) Uses [StickIt](https://github.com/NYTimes/backbone.stickit) to perform binding between the model and the view\n\n*If you have other cool examples, feel free to fork the fiddle, add a link here, and send me a pull request.*\n\n## FAQ\n\n### What gets validated when?\n\nIf you are using Backbone v0.9.1 or later, all attributes in a model will be validated. However, if for instance `name` never has been set (either explicitly or with a default value) that attribute will not be validated before it gets set.\n\nThis is very useful when validating forms as they are populated, since you don't want to alert the user about errors in input not yet entered.\n\nIf you need to validate entire model (both attributes that has been set or not) you can call `validate()` or `isValid(true)` on the model.\n\n### Can I call one of the built in validators from a method validator?\n\nYes you can!\n\n```js\nvar Model = Backbone.Model.extend({\n  validation: {\n    name: function(val, attr, computed) {\n      return Backbone.Validation.validators.length(val, attr, 4, this);\n    }\n  }\n});\n```\n\n### Can I call one of the built in validators from a custom validator?\n\nYes you can!\n\n```js\n_.extend(Backbone.Validation.validators, {\n  custom: function(value, attr, customValue, model) {\n    return this.length(value, attr, 4, model) || this.custom2(value, attr, customValue, model);\n  },\n  custom2: function(value, attr, customValue, model) {\n    if (value !== customValue) {\n      return 'error';\n    }\n  }\n});\n```\n\n### How can I allow empty values but still validate if the user enters something?\n\nBy default, if you configure a validator for an attribute, it is considered required. However, if you want to allow empty values and still validate when something is entered, add required: false in addition to other validators.\n\n```js\nvalidation: {\n\tvalue: {\n\t\tmin: 1,\n    required: false\n  }\n}\n```\n\n### Do you support conditional validation?\n\nYes, well, sort of. You can have conditional validation by specifying the required validator as a function.\n\n```js\nvalidation: {\n  attribute: {\n    required: function(val, attr, computed) {\n      return computed.someOtherAttribute === 'foo';\n    },\n    length: 10\n  }\n}\n```\n\nIn the example above, `attribute` is required and must have 10 characters only if `someOtherAttribute` has the value of foo. However, when `attribute` has any value it must be 10 characters, regardless of the value of `someOtherAttribute`.\n\n### Is there an elegant way to display the error message that is put into the data-error attribute?\n\nThe default implementation of the callbacks are a bit naïve, since it is very difficult to make a general implementation that suits everybody.\n\nMy recommendation is to override the callbacks and implement your own strategy for displaying the error messages.\n\nPlease refer to [this section](#callbacks) for more details.\n\n### How can I use it with Twitter Bootstrap?\n\n[driehle](https://github.com/driehle) put together a gist in Coffee Script that helps rendering the error messages for Twitter Bootstrap:\n\nhttps://gist.github.com/2909552\n\nBasic behaviour:\n\n* The control-group gets an error class so that inputs get the red border\n* By default error messages get rendered as `<p class=\"help-block\">` (which has red text because of the error class)\n* You may use &lt;input .... data-error-style=\"inline\"&gt; in your form to force rendering of a &lt;span class=\"help-inline\"&gt;\n\n## Release notes\n\n#### v0.11.5 [commits](https://github.com/thedersen/backbone.validation/compare/v0.11.4...v0.11.5)\n\n* Check for no associatedViews in unbindModel().\n\n#### v0.11.4 [commits](https://github.com/thedersen/backbone.validation/compare/v0.11.3...v0.11.4)\n\n* Support arrays in the attributes.\n\n#### v0.11.3 [commits](https://github.com/thedersen/backbone.validation/compare/v0.11.2...v0.11.3)\n\n* Upgrading version in source file. Fixes #274.\n\n#### v0.11.2 [commits](https://github.com/thedersen/backbone.validation/compare/v0.11.1...v0.11.2)\n\n* Triggers 'invalid' event when calling `isValid` and call `valid`/`invalid` callbacks when passing array or name to `isValid`.\n\n#### v0.11.1 [commits](https://github.com/thedersen/backbone.validation/compare/v0.11.0...v0.11.1)\n\n* Support intermediate nested levels\n\n#### v0.11.0 [commits](https://github.com/thedersen/backbone.validation/compare/v0.10.0...v0.11.0)\n\n* Support for binding multiple views to same model\n\n#### v0.10.1 [commits](https://github.com/thedersen/backbone.validation/compare/v0.10.0...v0.10.1)\n\n* Removed duplicated calls of `flatten` in `validate` method\n\n#### v0.10.0 [commits](https://github.com/thedersen/backbone.validation/compare/v0.9.2...v0.10.0)\n\n* `attributes` bind option allows to configure the attributes that will be validated\n\n#### v0.9.2 [commits](https://github.com/thedersen/backbone.validation/compare/v0.9.1...v0.9.2)\n\n* Fixed `flatten()` method causing `Maximum call stack size exceeded` errors. Fixes [#260](https://github.com/thedersen/backbone.validation/issues/260) [#180](https://github.com/thedersen/backbone.validation/issues/180) [#210](https://github.com/thedersen/backbone.validation/issues/210) [#224](https://github.com/thedersen/backbone.validation/issues/224) [#233](https://github.com/thedersen/backbone.validation/issues/233)\n\n#### v0.9.1 [commits](https://github.com/thedersen/backbone.validation/compare/v0.9.0...v0.9.1)\n\n* Upgraded buster.js to v0.7.8\n* Updated contribute section in readme\n* Update README.md typo: `i` => `is`. Fixes [#183](https://github.com/thedersen/backbone.validation/issues/183)\n* Fixed model unbind when model is also part of a collection of which other models have binding. Fixes [#182](https://github.com/thedersen/backbone.validation/issues/182)\n\n#### v0.9.0 [commits](https://github.com/thedersen/backbone.validation/compare/v0.8.2...v0.9.0)\n\n* Fixed undefined format function when calling one of the built in validators form within a method validator. Fixes [#98](https://github.com/thedersen/backbone.validation/issues/98) and [#111](https://github.com/thedersen/backbone.validation/issues/111)\n* BREAKING: Added ability to set error message per pattern. This means that if you have custom patterns, or have changed the message for one of the built in patterns, you need to [add/change a default message](http://thedersen.com/projects/backbone-validation/#extending-backbone-validation/adding-custom-patterns) for it. Fixes [#174](https://github.com/thedersen/backbone.validation/issues/174)\n* BREAKING: length, maxLength, minLength and rangeLength validators no longer secretly trims the string. Fixes [#134](https://github.com/thedersen/backbone.validation/issues/134)\n* Added new examples\n\n#### v0.8.2 [commits](https://github.com/thedersen/backbone.validation/compare/v0.8.1...v0.8.2)\n\n* `preValidate` now accepts a hash of attributes in addition to a key/value\n* `msg` attribute can be defined as both a function or a string\n* `validation` attribute can be defined as both a function or a hash\n* You can pass an optional model/collectionto bind to use instead of view.model/view.collection\n\n#### v0.8.1 [commits](https://github.com/thedersen/backbone.validation/compare/v0.8.0...v0.8.1)\n\n* No longer flattens arrays\n* Added required validator test for empty and non-empty arrays\n* Replaces all the underscores in sentenceCase formatter\n\n#### v0.8.0 [commits](https://github.com/thedersen/backbone.validation/compare/v0.7.1...v0.8.0)\n\n* All tests pass Backbone v1.0\n* Fixes recursive loop if model attributes contain nested models. Fixes #97 (Thanks to [Adam George](https://github.com/asgeo1))\n* Handling id selectors better. Fixes #127 (Thanks to [BigBlueHat](https://github.com/BigBlueHat))\n\n#### v0.7.1 [commits](https://github.com/thedersen/backbone.validation/compare/v0.7.0...v0.7.1)\n\n* Fixed Sizzle error: \"unrecognized expression\" (Thanks to [Vladimir Tsvang](https://github.com/vtsvang))\n* Only binds to a collection when a model is not present on the view. Fixes #89\n* Tested with Backbone v0.9.9\n\n#### v0.7.0 [commits](https://github.com/thedersen/backbone.validation/compare/v0.6.4...v0.7.0)\n\n* Nested validation is back! See [Configure validation rules](#configure-validation-rules-on-the-model)\n\n#### v0.6.4 [commits](https://github.com/thedersen/backbone.validation/compare/v0.6.3...v0.6.4)\n\n* `format(...)` and `formatLabel(...)` are made available for custom validators on `this` (Thanks to [rafanoronha](https://github.com/rafanoronha))\n\n#### v0.6.3 [commits](https://github.com/thedersen/backbone.validation/compare/v0.6.2...v0.6.3)\n\n* Labelformatter set to 'label' no longer crashes when no `labels` attribute is present on the model\n* Does not invoke callbacks for attributes that are not validated\n* Valid callbacks are always called before invalid callbacks (Thanks to [Justin Etheredge](https://github.com/jetheredge))\n* Fixed typo in the readme\n\n#### v0.6.2\n\n* Fixed typo in the package.json (Thanks to [Patrick Scott](https://github.com/patrickleet))\n\n#### v0.6.1\n\n* AMD and node.js support in a seperate download\n* Available on npm\n* Throws error if the view has no model or collection when executing the binding\n\n#### v0.6.0\n\n* *BREAKING:* Nested validation is no longer supported as it came with too many issues with no obvious solution. Since it added more confusion than solving real problems, it is out until I can figure a better way of handling it.\n* *BREAKING:* The array with attribute names passed to the validated/error events is replaced with an object with attribute name and error message {name: \"Name is required\"}\n* Verified that all tests passes Backbone v0.9.2\n* Fixed misspelling in `collectionAdd` function (Fixes #28, thanks to [morgoth](https://github.com/morgoth))\n* Ensure model with custom `toJSON()` validates correctly (Fixes #31, thanks to [jasonzhao6](https://github.com/jasonzhao6))\n* Wrong spelling of 'greater' as I'm sure we are not validating cheese (Fixes #35, thanks to [JProgrammer](https://github.com/JProgrammer))\n* Fixed error when using mixin and setting values on models without validation (Fixes #36)\n* Added `preValidate(attr, value)` method on validated models that can be used to preview if a value is valid or not\n* User friendly names for attributes in validation messages (Thanks to [josjevv](https://github.com/josjevv))\n* Required validator gets the same paramenters as method validator when specified as a function\n* Lots of code clean up and restructuring\n* Improved documentation\n\n#### v0.5.2\n\n* Fixed equalTo validator when setting both values at the same time (Fixes #27)\n* Fixed removing invalid class in view when validating dependent attributes, and changing one makes the other valid\n\n#### v0.5.1\n\n* `error` argument passed to the error event raised by Backbone is always an array\n* Can pass the name of an attribute or an array of names to `isValid` to verify if the attribute(s) are valid\n\n#### v0.5.0\n\n* Support for Backbone v0.9.1\n* Support for object/nested validation (Fixed #20, thanks to [AndyUK](https://github.com/andyuk))\n* Support for binding to a view with a collection of models\n* Support for mixing in validation on `Backbone.Model.prototype`\n* Context (this) in custom validators is the `Backbone.Validation.validators` object\n* Calling `unbind` on a view without model no longer throws (Fixes #17)\n* Method validators get a computed model state (i.e. the state of the model if the current set operation succeeds) as the third argument (Fixes #22)\n* `forceUpdate` can be specified when settings attributes (Backbone.VERSION >= 0.9.1 only)\n\n#### v0.4.0\n\n* `isValid` returns `undefined` when no validatation has occured and the model has validation\n* Passing `true` to `isValid` forces an validation\n* When specifying multiple validators for one attribute, all can have it's own error message (thanks to [GarethElms](https://github.com/GarethElms))\n* method validator and named method validator can be combined with other built-in validators\n* acceptance validator accepts 'true' as valid (Fixes issue #12)\n* Can configure per view or globally to force update the model with invalid values. This can be very useful when using automatic modelbinding and late validation (e.g. when submitting the form)\n* email pattern is case insensitive\n* Breaking changes (unfortunate, but necessary):\n  * `setDefaultSelector` is removed, and you need to call `configure({selector: 'class'})` instead\n\n#### v0.3.1\n\n* Fixed issue with validated events being triggered before model was updated\n* Added model and an array of invalid attribute names as arguments to the events\n\n#### v0.3.0\n\n* Triggers events when validation is performed (thanks to [GarethElms](https://github.com/GarethElms)):\n  * 'validated' with `true` or `false` as argument\n  * 'validated:valid' when model is valid\n  * 'validated:invalid' when model is invalid\n* Named method validator get the name of the attribute being validate as the second argument (thanks to [goreckm](https://github.com/goreckm))\n* `error` argument passed to the error event raised by Backbone contains an array of errors when validating multiple attributed in one go, otherwise a string\n* Breaking changes (unfortunate, but necessary):\n  * isValid attribute (`model.get('isValid')`) is replaced with a method `model.isValid()`\n  * Default selector is 'name' instead of 'id'\n\n#### v0.2.0\n\n* New validators:\n  * named method\n  * length\n  * acceptance (which is typically used when the user has to accept something (e.g. terms of use))\n  * equalTo\n  * range\n  * rangeLength\n  * oneOf\n* Added possibility to validate entire model by explicitly calling `model.validate()` without any parameters. (Note: `Backbone.Validation.bind(..)` must still be called)\n* required validator can be specified as a method returning either `true` or `false`\n* Can override the default error messages globally\n* Can override the id selector (#) used in the callbacks either globally or per view when binding\n* Improved email pattern for better matching\n* Added new pattern 'digits'\n* Possible breaking changes:\n  * Removed the unused msg parameter when adding custom validators\n  * Number pattern matches negative numbers (Fixes issue #4), decimals and numbers with 1000-separator (e.g. 123.000,45)\n  * Context (this) in the method validators is now the model instead of the global object (Fixes issue #6)\n  * All validators except required and acceptance invalidates null, undefined or empty value. However, required:false can be specified to allow null, undefined or empty value\n* Breaking changes (unfortunate, but necessary):\n  * Required validator no longer invalidates false boolean, use the new acceptance validator instead\n\n#### v0.1.3\n\n* Fixed issue where min and max validators treated strings with leading digits as numbers\n* Fixed issue with undefined Backbone reference when running Backbone in no conflict mode\n* Fixed issue with numeric string with more than one number not being recognized as a number\n\n#### v0.1.2\n\n* Initial release\n\n## Contribute\n\nIn lieu of a formal styleguide, use two spaces for tabs and take care to maintain the existing coding style.\n\nFor a pull request to be accepted it must contain:\n\n* Only *one change* per request\n* Unit test(s)\n\nMake sure that all tests passes before submitting your pull request.\n\n```\nnpm install -g grunt-cli\nnpm install\ngrunt\n```\n\n## Inspiration\n\nBackbone.Validation is inspired by [Backbone.ModelBinding](http://github.com/derickbailey/backbone.modelbinding), and another implementation with a slightly different approach than mine at [Backbone.Validations](http://github.com/n-time/backbone.validations).\n\n## License\n\nhttp://thedersen.mit-license.org/\n","maintainers":[{"name":"thedersen","email":"thedersen@gmail.com"},{"name":"chiefgui","email":"guilherme@oderdenge.com"}],"time":{"modified":"2022-06-13T04:10:31.589Z","created":"2012-03-09T21:29:54.221Z","0.1.1":"2012-03-09T21:29:56.933Z","0.6.1":"2012-08-01T12:46:10.975Z","0.6.2":"2012-08-07T16:28:50.539Z","0.6.3":"2012-11-20T21:55:18.968Z","0.6.4":"2012-11-21T20:28:05.976Z","0.7.0":"2012-11-24T01:41:32.549Z","0.7.1":"2012-12-27T15:37:08.613Z","0.8.0":"2013-06-10T12:58:52.765Z","0.8.1":"2013-08-18T15:33:05.380Z","0.8.2":"2013-10-16T20:47:44.928Z","0.9.0":"2013-10-31T12:04:07.509Z","0.9.1":"2014-01-08T21:27:05.680Z","0.9.2":"2015-01-23T13:29:28.404Z","0.10.0":"2015-01-26T21:05:06.655Z","0.10.1":"2015-01-28T15:15:11.852Z","0.11.0":"2015-01-29T15:53:45.839Z","0.11.1":"2015-02-02T16:00:24.365Z","0.11.2":"2015-02-03T14:25:09.146Z","0.11.3":"2015-02-04T22:39:02.300Z","0.11.4":"2015-05-06T18:49:11.788Z","0.11.5":"2015-05-08T14:37:28.011Z"},"author":{"name":"Thomas Pedersen","url":"http://thedersen.com/"},"repository":{"type":"git","url":"http://github.com/thedersen/backbone.validation.git"},"users":{"fgribreau":true,"tjwebb":true,"thelmos":true},"homepage":"http://thedersen.com/projects/backbone-validation","bugs":{"url":"http://github.com/thedersen/backbone.validation/issues"},"readmeFilename":"README.md"}