{"_id":"@apatheticwes/validator","_rev":"6-e6c0461edc1ef859139771f4c401448e","name":"@apatheticwes/validator","description":"A simple, extendable client-side valiator","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.0":{"name":"@apatheticwes/validator","description":"A simple, extendable client-side valiator","author":{"name":"wes hatch"},"version":"0.1.0","license":"MIT","main":"./dist/parallax.cjs.js","broswer":"./dist/parallax.browser.js","jsnext:main":"./dist/parallax.es6.js","repository":{"type":"git","url":"git+https://github.com/apathetic/validator.git"},"keywords":["validator"],"scripts":{"start":"http-server ./ -p 8080 -d","clean":"rm -f dist/*.js*","build":"npm run clean && npm run lint && rollup -c","lint":"eslint src/*.js","test":"#tape -r babel-register test/*.js"},"devDependencies":{"eslint":"^3.1.1","eslint-config-defaults":"^9.0.0","http-server":"^0.9.0","rollup":"^0.34.1","rollup-plugin-buble":"^0.12.1","rollup-plugin-uglify":"^1.0.1","tape":"^4.6.0","uglify-js":"^2.7.0"},"gitHead":"bd713a5a780c69daa0ea8cf6c1c6f7159691555c","bugs":{"url":"https://github.com/apathetic/validator/issues"},"homepage":"https://github.com/apathetic/validator#readme","_id":"@apatheticwes/validator@0.1.0","_shasum":"9c1b609236a3c029a000aed074ccbbd4da69a5cb","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.2.2","_npmUser":{"name":"apatheticwes","email":"wes.hatch@gmail.com"},"dist":{"shasum":"9c1b609236a3c029a000aed074ccbbd4da69a5cb","tarball":"https://registry.npmjs.org/@apatheticwes/validator/-/validator-0.1.0.tgz","integrity":"sha512-JzoZJeoizI+79yi10j60jH713POzw4rSFRKUpvCx7m+xnP68IP9C4W7h+e7Cq8x20DqKBnK6nXoF+fFYs5C/Ug==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhqXh3nfHHmmNtzNCvPe3YPDYGo5jlof7R1FACuBc6YwIhAJTYxEDg53iE/eMcI1Dp0fe6iNrHsaDn2MG+oFvW+3/K"}]},"maintainers":[{"name":"apatheticwes","email":"wes.hatch@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/validator-0.1.0.tgz_1470937197076_0.0916537765879184"}},"0.1.1":{"name":"@apatheticwes/validator","description":"A simple, extendable client-side valiator","author":{"name":"wes hatch"},"version":"0.1.1","license":"MIT","main":"./dist/validator.cjs.js","broswer":"./dist/validator.browser.js","jsnext:main":"./dist/validator.es6.js","repository":{"type":"git","url":"git+https://github.com/apathetic/validator.git"},"keywords":["validator"],"scripts":{"start":"http-server ./ -p 8080 -d","clean":"rm -f dist/*.js*","build":"npm run clean && npm run lint && rollup -c","lint":"eslint src/*.js","test":"#tape -r babel-register test/*.js"},"devDependencies":{"eslint":"^3.1.1","eslint-config-defaults":"^9.0.0","http-server":"^0.9.0","rollup":"^0.34.1","rollup-plugin-buble":"^0.12.1","rollup-plugin-uglify":"^1.0.1","tape":"^4.6.0","uglify-js":"^2.7.0"},"gitHead":"84a943063a7c03f2608e4e062296e9ad32c0fec8","bugs":{"url":"https://github.com/apathetic/validator/issues"},"homepage":"https://github.com/apathetic/validator#readme","_id":"@apatheticwes/validator@0.1.1","_shasum":"8398bf71fbbd107fa85cd58e1e02af5f87867efc","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.2.2","_npmUser":{"name":"apatheticwes","email":"wes.hatch@gmail.com"},"dist":{"shasum":"8398bf71fbbd107fa85cd58e1e02af5f87867efc","tarball":"https://registry.npmjs.org/@apatheticwes/validator/-/validator-0.1.1.tgz","integrity":"sha512-0c4X8wnDffpYQiU/o/gkrJ0R+nIAoRXk7hx33o+DSAfCiUhAfXz63PCMKpDP6H6Hg66KzMw9+jSWapDG69UJbg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAZHQTVD0wMSbJjx2ymlXtVFf/l5DxAXrCm5DAh+Vj2FAiBwXg0aIE99s3Z5oNaNgmT4PN5lLyPiWGUnJwOG3rEHhw=="}]},"maintainers":[{"name":"apatheticwes","email":"wes.hatch@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/validator-0.1.1.tgz_1470937282866_0.11015686439350247"}},"0.1.2":{"name":"@apatheticwes/validator","description":"A simple, extendable client-side valiator","author":{"name":"wes hatch"},"version":"0.1.2","license":"MIT","main":"./dist/validator.cjs.js","broswer":"./dist/validator.js","jsnext:main":"./dist/validator.es6.js","repository":{"type":"git","url":"git+https://github.com/apathetic/validator.git"},"keywords":["validator"],"scripts":{"start":"http-server ./ -p 8080 -d","clean":"rm -f dist/*.js*","build":"npm run clean && npm run lint && rollup -c","lint":"eslint src/*.js","test":"#tape -r babel-register test/*.js"},"devDependencies":{"eslint":"^3.1.1","eslint-config-defaults":"^9.0.0","http-server":"^0.9.0","rollup":"^0.34.1","rollup-plugin-buble":"^0.12.1","rollup-plugin-uglify":"^1.0.1","tape":"^4.6.0","uglify-js":"^2.7.0"},"gitHead":"59f2d7ef6158c7935ef426e05eabedcbd56cb734","bugs":{"url":"https://github.com/apathetic/validator/issues"},"homepage":"https://github.com/apathetic/validator#readme","_id":"@apatheticwes/validator@0.1.2","_shasum":"76a409104daba64873aa45a4637ca0ee6c884971","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.2.2","_npmUser":{"name":"apatheticwes","email":"wes.hatch@gmail.com"},"dist":{"shasum":"76a409104daba64873aa45a4637ca0ee6c884971","tarball":"https://registry.npmjs.org/@apatheticwes/validator/-/validator-0.1.2.tgz","integrity":"sha512-ylhv6/K2IlK+HsQAx714hE82FOmbZ20SWycUlSAu6Hct/mke2CFqDPqyZ7YwCjD3+DYN18J7BZs1k0rlBc0Q0g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCqvPjZhafhbUC/2sgpPljlpTLA9oaYdb/uH7Xpobv+UQIgdM8a0V92uwpCUaAd1W2eiZq8/vQ796Xk2cmwexWbEUU="}]},"maintainers":[{"name":"apatheticwes","email":"wes.hatch@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/validator-0.1.2.tgz_1471446166995_0.8347549100872129"}},"0.1.3":{"name":"@apatheticwes/validator","description":"A simple, extendable client-side valiator","author":{"name":"wes hatch"},"version":"0.1.3","license":"MIT","main":"./dist/validator.cjs.js","broswer":"./dist/validator.js","jsnext:main":"./dist/validator.es6.js","repository":{"type":"git","url":"git+https://github.com/apathetic/validator.git"},"keywords":["validator"],"scripts":{"start":"http-server ./ -p 8080 -d","clean":"rm -f dist/*.js*","build":"npm run clean && npm run lint && rollup -c","lint":"eslint src/*.js","test":"#tape -r babel-register test/*.js"},"devDependencies":{"eslint":"^3.1.1","eslint-config-defaults":"^9.0.0","http-server":"^0.9.0","rollup":"^0.34.1","rollup-plugin-buble":"^0.12.1","rollup-plugin-uglify":"^1.0.1","tape":"^4.6.0","uglify-js":"^2.7.0"},"gitHead":"bdedbf97071aff3e9808488edc21ee787b378984","bugs":{"url":"https://github.com/apathetic/validator/issues"},"homepage":"https://github.com/apathetic/validator#readme","_id":"@apatheticwes/validator@0.1.3","_shasum":"f042ac1097250957745a5dddceec6c0de0189a02","_from":".","_npmVersion":"3.10.5","_nodeVersion":"6.2.2","_npmUser":{"name":"apatheticwes","email":"wes.hatch@gmail.com"},"dist":{"shasum":"f042ac1097250957745a5dddceec6c0de0189a02","tarball":"https://registry.npmjs.org/@apatheticwes/validator/-/validator-0.1.3.tgz","integrity":"sha512-P5bLc7w3wo7La4MCdJk5r1iALT0seuJ8k13hyPznZV6ovXl7iBaTjTBMtHtvu/0QqiXHeAgyGvVXI+qmMiL6TA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDzbSCeKSG3p/XrpLVnxH6qYy3FI2a2BX6R/mCcq4QU/gIhAPV0XlOP9dGv3AYnokAnSqvR6Yr2vg1Ew+jPlFS648PU"}]},"maintainers":[{"name":"apatheticwes","email":"wes.hatch@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/validator-0.1.3.tgz_1471446217695_0.3028758866712451"}}},"readme":"# Validator\n\nA simple and extendable client-side form Validator.\n\n## Overview\n\nThis a simple, extensible client-side validation class. It's \"simple\" because it includes only a small and basic set of validation functions. However, it's easily extensible so you may add your own types of custom validation.\n\nWhile most other Validators require a particular accompanying Javascript framework, this one does not. Additionally, rather than a bloaty, full-featured validator, the approach taken herein is to create a basic validator that covers most general use-cases. If it doesn't cover yours, you can easily add any required functionality.</p>\n\n## Getting Started\n\n* with npm:  ```npm install @apathetic/validator```\n* with git:  ```git clone git@github.com:apathetic/validator.git```\n\nThere is an ES6 module you may consume however you wish. Then:\n\n**Check a form**\n```javascript\nvar form = document.querySelector('#userForm');\nvar valid = Validator.check(form);\n```\n\n**Check a field**\n```javascript\nvar field = document.querySelector('#email');\nvar valid = Validator.check(field);\n```\n```html\n<input id=\"email\" name=\"email\" data-validate=\"email\" required />\n```\n\n**Add a custom rule**\n```javascript\n// add a rule called \"count\" that checks an input's length\nValidator.updateRule('count', function count(val) {\n  return val.length <= 40;\n});\n```\n```html\n<textarea data-validate=\"count\" required>40 characters or less, here</textarea>\n```\n\n\n## Methods\n\n| method | args | description |\n| ------ | ----------- |\n| check() | element (HTMLElement), success (Function) | Pass in a field or a DOM fragment. Checks if field (or fields within the fragment) are valid according to any data-validate/required attributes |\n| updateRule() | name (String), validator (Function) | Add your own validation function. The validation function receives the field value to check against. Use your new rule by placing _data-validate=\"name\"_ on a field |\n\n## Demo\n\nAfter cloning the repo:\n```\nnpm i\nnpm start\n```\n\nA server will spin up at ```http://localhost:8080```, where you may play with the various examples.\n\n## Support\n* IE9+\n* Safari / Chrome\n* Firefox\n* iOS\n* Android 4.0+\n\n## Examples\n\nPlease see the _test / demo_ directory\n\n## Release History\n\n### 0.1\n* first release\n","maintainers":[{"name":"apatheticwes","email":"wes.hatch@gmail.com"}],"time":{"modified":"2022-06-12T14:43:32.039Z","created":"2016-08-11T17:39:58.318Z","0.1.0":"2016-08-11T17:39:58.318Z","0.1.1":"2016-08-11T17:41:24.858Z","0.1.2":"2016-08-17T15:02:48.797Z","0.1.3":"2016-08-17T15:03:39.560Z"},"homepage":"https://github.com/apathetic/validator#readme","keywords":["validator"],"repository":{"type":"git","url":"git+https://github.com/apathetic/validator.git"},"author":{"name":"wes hatch"},"bugs":{"url":"https://github.com/apathetic/validator/issues"},"license":"MIT","readmeFilename":"README.md"}