{"_id":"fluent-ts-validator","_rev":"17-6a78c68b6b53156f4f9734fab51e495a","name":"fluent-ts-validator","description":"A fluent validator written in TypeScript","dist-tags":{"latest":"3.0.3"},"versions":{"1.0.0-rc.3":{"name":"fluent-ts-validator","version":"1.0.0-rc.3","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.47","@types/validator":"6.2.0","chokidar-cli":"1.2.0","codecov":"2.1.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.5.3","jasmine-console-reporter":"1.2.7","jasmine-core":"2.5.2","jasmine-ts":"0.1.0","rimraf":"2.6.1","snyk":"1.28.0","ts-node":"^3.0.2","tslint":"5.0.0","typescript":"2.2.2"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"chokidar -d 1000 -p 'src/**/*.ts' -c 'npm run test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:ci":"JASMINE_CONFIG_PATH=./spec/support/jasmine-ci.json jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov"},"dependencies":{"validator":"7.0.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@1.0.0-rc.3","_shasum":"32dd7c9fd7866bcd66cb4f2be3b9ad5aac1491e3","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"32dd7c9fd7866bcd66cb4f2be3b9ad5aac1491e3","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-1.0.0-rc.3.tgz","integrity":"sha512-NY2JQ3GfI//nln9znT6tJ0bRXzmn8F2RYS0UA3mB8ZAmK+KhBWPVVOhtjEsS/jt2ms5ia651O1s2AAdq5oCtnA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClruYObNVRZXTgPzAMuH7r97NbYL+KrWs157I+a7K7BQIgL55X7NHis5gPTJ94GlRAB8FwOM0jW0PTUrWsjeHdcoU="}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/fluent-ts-validator-1.0.0-rc.3.tgz_1491946659837_0.02835373766720295"},"directories":{}},"1.0.0-rc.5":{"name":"fluent-ts-validator","version":"1.0.0-rc.5","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.47","@types/validator":"6.2.0","chokidar-cli":"1.2.0","codecov":"2.1.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.5.3","jasmine-console-reporter":"1.2.7","jasmine-core":"2.5.2","jasmine-ts":"0.1.0","rimraf":"2.6.1","snyk":"1.28.0","ts-node":"^3.0.2","tslint":"5.0.0","typescript":"2.2.2"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"chokidar -d 1000 -p 'src/**/*.ts' -c 'npm run test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:ci":"JASMINE_CONFIG_PATH=./spec/support/jasmine-ci.json jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov"},"dependencies":{"validator":"7.0.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@1.0.0-rc.5","_shasum":"80e0cb19467b9ca737ebe726ceb2ae6beb3bef5a","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"80e0cb19467b9ca737ebe726ceb2ae6beb3bef5a","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-1.0.0-rc.5.tgz","integrity":"sha512-qzw9P1gWEPxdQUXfYVxjxTR96yFkKSW55zPGXbhnSf/i6+oDcr/ZtC15StgfRoBeyyu162Kth39gxsEM8dw2KA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxF0s1rxBV67RGIMMznpg2fGzjIYlAKDoTtZ4Br2qcEQIhAKp/nmfkls2CJuxf+u52U2j8m/XH4Q4UdBsNiLtTwCW4"}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/fluent-ts-validator-1.0.0-rc.5.tgz_1491950871065_0.4438605571631342"},"directories":{}},"1.0.0":{"name":"fluent-ts-validator","version":"1.0.0","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.47","@types/validator":"6.2.0","chokidar-cli":"1.2.0","codecov":"2.1.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.5.3","jasmine-console-reporter":"1.2.7","jasmine-core":"2.5.2","jasmine-ts":"0.1.0","rimraf":"2.6.1","snyk":"1.28.0","ts-node":"3.0.2","tslint":"5.0.0","typescript":"2.2.2"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"chokidar -d 1000 -p 'src/**/*.ts' -c 'npm run test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:ci":"JASMINE_CONFIG_PATH=./spec/support/jasmine-ci.json jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov"},"dependencies":{"validator":"7.0.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@1.0.0","_shasum":"0873ad61f9fbfd09054393a90350090257ab3ff2","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"0873ad61f9fbfd09054393a90350090257ab3ff2","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-1.0.0.tgz","integrity":"sha512-1dUtxT8cB8F5akLrH9Mkat2G0Iyg7LieiKOOHwwMyFM1+M5KVjZBdkjmxwZPRrAAWDwYVcJmMDHrD/AN3OlZOw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCmDyKznRNr0+mMH33AN9FDfIJaPW7kHmGmyxrVz8P1xAIgUDXgOFTrgZctRPWS4N8X9iaCTkz1+2ZCPAgDxs1Brr8="}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/fluent-ts-validator-1.0.0.tgz_1492459154745_0.7957161909434944"},"directories":{}},"1.1.0":{"name":"fluent-ts-validator","version":"1.1.0","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.47","@types/validator":"6.2.0","codecov":"2.1.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.5.3","jasmine-console-reporter":"1.2.7","jasmine-core":"2.5.2","jasmine-ts":"0.1.0","nodemon":"1.11.0","rimraf":"2.6.1","snyk":"1.28.0","ts-node":"3.0.2","tslint":"5.0.0","typescript":"2.2.2"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"nodemon --watch src --ext ts --exec 'npm test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:ci":"JASMINE_CONFIG_PATH=./spec/support/jasmine-ci.json jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov"},"dependencies":{"validator":"7.0.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@1.1.0","_shasum":"b61a4160e76ac53c4328cad86424e49525682e05","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.9.0","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"b61a4160e76ac53c4328cad86424e49525682e05","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-1.1.0.tgz","integrity":"sha512-KXd9S3zzMFhH5/ArYz1jFm8hCQqzb2qIVvLPWTW2k/Rn/VFgeFOFrvwWHWkFGzMTxWkQ3xRVJzYM9ONxACYoiw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQXMasZS88roQ0tDt4FKuO1QE+JFXuRGgB3rHy1JBl/QIhAKBdZCeh7DFp/x89MStZ8G5Hq+FVnpoPG1Ox2N6M/U+c"}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/fluent-ts-validator-1.1.0.tgz_1492958154152_0.8115955744870007"},"directories":{}},"1.1.1":{"name":"fluent-ts-validator","version":"1.1.1","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.47","@types/validator":"6.2.0","codecov":"2.1.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.5.3","jasmine-console-reporter":"1.2.7","jasmine-core":"2.5.2","jasmine-ts":"0.1.0","nodemon":"1.11.0","npm-check":"5.4.0","rimraf":"2.6.1","snyk":"1.29.0","ts-node":"3.0.2","tslint":"5.1.0","typescript":"2.2.2"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"nodemon --watch src --ext ts --exec 'npm test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:ci":"JASMINE_CONFIG_PATH=./spec/support/jasmine-ci.json jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov","npm-check":"npm-check --skip-unused"},"dependencies":{"validator":"7.0.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@1.1.1","_shasum":"642277f2657e3d58ac11d3e5a40203bfbfb8bc59","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"642277f2657e3d58ac11d3e5a40203bfbfb8bc59","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-1.1.1.tgz","integrity":"sha512-C3v226+Z8BwkqXeucaW81/6aUDW+LbkqeQs7wOkRJoyq7da0QozYW89lGlDP/Mke8yHg1zOwDon+k+nnOYpiEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOg5J9zvq1acVbEmJFp9B6ggGZNS2g1m0niXITn2eTgwIhAKpXnxSRqRtGSmwhdDWyWNsniC+djPLemdBaFOmeT5zF"}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/fluent-ts-validator-1.1.1.tgz_1494090060999_0.48258014977909625"},"directories":{}},"2.0.0":{"name":"fluent-ts-validator","version":"2.0.0","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.47","@types/validator":"6.2.0","codecov":"2.2.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.6.0","jasmine-console-reporter":"1.2.7","jasmine-core":"2.6.1","jasmine-ts":"0.1.2","nodemon":"1.11.0","npm-check":"5.4.4","rimraf":"2.6.1","snyk":"1.30.0","ts-node":"3.0.4","tslint":"5.2.0","typescript":"2.3.2"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md CHANGELOG.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"nodemon --watch src --ext ts --exec 'npm test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov","npm-check":"npm-check --skip-unused"},"dependencies":{"validator":"7.0.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@2.0.0","_shasum":"a6838b54c5e6d3186013b36938be04f6a702d965","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"a6838b54c5e6d3186013b36938be04f6a702d965","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-2.0.0.tgz","integrity":"sha512-NCoskPeuj9N10BM0dXanBwxYOMMz13A5gbXt330ReMt6nAjcvDK96NTbgAcqGarHUoKyc+ziBhwYgZcrF/2EEQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGZ0CMZibrUaoAV8WzFmxd6V0p31KmuKLoaYF8oMMm5pAiA/In97dvQywwWJUt8UHCZX7jeGb6o8WF6KClK8yGO/2A=="}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/fluent-ts-validator-2.0.0.tgz_1494789310921_0.2795543249230832"},"directories":{}},"2.0.1":{"name":"fluent-ts-validator","version":"2.0.1","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.47","@types/validator":"6.2.0","codecov":"2.2.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.6.0","jasmine-console-reporter":"1.2.7","jasmine-core":"2.6.1","jasmine-ts":"0.1.2","nodemon":"1.11.0","npm-check":"5.4.4","rimraf":"2.6.1","snyk":"1.30.0","ts-node":"3.0.4","tslint":"5.2.0","typescript":"2.3.2"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md CHANGELOG.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"nodemon --watch src --ext ts --exec 'npm test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov","npm-check":"npm-check --skip-unused"},"dependencies":{"validator":"7.0.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@2.0.1","_shasum":"645a56394ca8107a5fe1b01aa3134cf715ae1941","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"645a56394ca8107a5fe1b01aa3134cf715ae1941","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-2.0.1.tgz","integrity":"sha512-G08E7jgcsqZBw3skGecCUWuKt2mjfZpviEnxi1RpelxXlmL+uV9G9/+PTSmdu9JSwZO50TvoF+h+eWGxWjA2sQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBOfcEMoLcpvLfoPcV+cWAy8/lqtATGSto/9W9BI9qZ5AiB2zdAZ0UX+TRnNAqNG/5sbijfygRhX7h1oYWcYQkccvA=="}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fluent-ts-validator-2.0.1.tgz_1495478650960_0.38189039402641356"},"directories":{}},"2.1.0":{"name":"fluent-ts-validator","version":"2.1.0","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.51","@types/validator":"6.2.0","codecov":"2.2.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.6.0","jasmine-console-reporter":"1.2.7","jasmine-core":"2.6.3","jasmine-ts":"0.1.3","nodemon":"1.11.0","npm-check":"5.4.4","rimraf":"2.6.1","snyk":"1.34.3","ts-node":"3.0.6","tslint":"5.4.3","typescript":"2.3.4"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md CHANGELOG.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"nodemon --watch src --ext ts --exec 'npm test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov","npm-check":"npm-check --skip-unused"},"dependencies":{"validator":"7.0.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@2.1.0","_shasum":"9843adc7307bad3691ec763743c5efb359f7780b","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.10.0","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"9843adc7307bad3691ec763743c5efb359f7780b","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-2.1.0.tgz","integrity":"sha512-HJFkHytkr7f/2OeCmOsBDmEO9MEZ/IulQLF6/Z+4KX1kpgTISUdQsWzeFXiq8iN2mM9lMhzbV0sPg4Adj3vkvA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMtaJoH2YdT/jIj1PkUvoTRZ8txaVpO7ydUkkIKsL/JwIhAMnXlLOZcfasXkWm4P3sITTzte1PhdK+ge6iQYt00q0w"}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fluent-ts-validator-2.1.0.tgz_1497135816338_0.6402066031005234"},"directories":{}},"2.1.1":{"name":"fluent-ts-validator","version":"2.1.1","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.51","@types/validator":"6.2.0","codecov":"2.2.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.6.0","jasmine-console-reporter":"1.2.7","jasmine-core":"2.6.3","jasmine-ts":"0.1.3","nodemon":"1.11.0","npm-check":"5.4.4","rimraf":"2.6.1","snyk":"1.34.3","ts-node":"3.0.6","tslint":"5.4.3","typescript":"2.3.4"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md CHANGELOG.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"nodemon --watch src --ext ts --exec 'npm test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov","npm-check":"npm-check --skip-unused"},"dependencies":{"validator":"7.0.0"},"keywords":["typescript","validator","fluent API"],"gitHead":"6fc40ec7f510d4581e1ecf3b8117ca1b6bfe0aad","bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@2.1.1","_shasum":"99c30ed97a68887d7acfdfb3dcce373110e5b566","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.2.0","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"99c30ed97a68887d7acfdfb3dcce373110e5b566","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-2.1.1.tgz","integrity":"sha512-YHe3Yi37JbGesnPCkhRp31mSoZdLxPn8s5TVuE/R0ZL9qWQTjBRcK84Bt4u+CG+ULC8HEbu2/KkrXxmHR+31Hg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHBE9L9CQ1kbDbcsuSxmMP/U00evtdnXedyPkBZUePjBAiEA3f2qSSMJnMV+Epxk0ip+zGUK89iI3PZC408EjMtd/M8="}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fluent-ts-validator-2.1.1.tgz_1503847358825_0.6712135856505483"},"directories":{}},"2.1.2":{"name":"fluent-ts-validator","version":"2.1.2","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.51","@types/validator":"6.2.0","codecov":"2.2.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.6.0","jasmine-console-reporter":"1.2.7","jasmine-core":"2.6.3","jasmine-ts":"0.1.3","nodemon":"1.11.0","npm-check":"5.4.4","rimraf":"2.6.1","snyk":"1.34.3","ts-node":"3.0.6","tslint":"5.4.3","typescript":"2.3.4"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md CHANGELOG.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"nodemon --watch src --ext ts --exec 'npm test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov","npm-check":"npm-check --skip-unused"},"dependencies":{"validator":"7.0.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@2.1.2","_shasum":"2e50f7e3bf9315d5f2c3f4be49f39695907b7b87","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.10.1","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"2e50f7e3bf9315d5f2c3f4be49f39695907b7b87","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-2.1.2.tgz","integrity":"sha512-z9EGvJNUs7Yx94XcsfUtrDtwsGQraLUgZMCrRXb52twcB/f0cr+cW8yrhCNzBznFxC9mO9DbWxRshEtX9lHtdA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgzisZpOFlfRo96/2ETsWzvLudN051dlCKYts14jmAYQIgBH7Buylx3cgLM0ANgznZNfOKfRjqqXXUdsOOWgoQzRg="}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fluent-ts-validator-2.1.2.tgz_1503943561941_0.3747946275398135"},"directories":{}},"3.0.0-rc.1":{"name":"fluent-ts-validator","version":"3.0.0-rc.1","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.54","codecov":"2.3.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.8.0","jasmine-console-reporter":"2.0.1","jasmine-core":"2.8.0","jasmine-ts":"0.2.1","nodemon":"1.12.0","npm-check":"5.4.5","rimraf":"2.6.1","snyk":"1.40.2","ts-node":"3.3.0","tslint":"5.7.0","typescript":"2.5.2"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md CHANGELOG.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"nodemon --watch src --ext ts --exec 'npm test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov","npm-check":"npm-check --skip-unused"},"dependencies":{"validator":"8.1.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@3.0.0-rc.1","_shasum":"9d0164a383bbbcf37b691232679a6aaa3d61444a","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.10.1","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"9d0164a383bbbcf37b691232679a6aaa3d61444a","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-3.0.0-rc.1.tgz","integrity":"sha512-PGDzxpYfyhoop1znN1x0CIYvxT6lPD0an2608BVdzVpXoQXJJo8VjVSQSM596FW2UlX7l8E8UKeNzeNsGbtUGA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDCx9ENjGc43jTkppZMOJuLUG77cJlK93ne8HfWpQBrXAiEAmPcUaDQwBEpEhEBIngJZJ4zHjnUNmQza2UC5IrSYkBo="}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fluent-ts-validator-3.0.0-rc.1.tgz_1504703772942_0.9502438723575324"},"directories":{}},"3.0.0":{"name":"fluent-ts-validator","version":"3.0.0","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.54","codecov":"2.3.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.8.0","jasmine-console-reporter":"2.0.1","jasmine-core":"2.8.0","jasmine-ts":"0.2.1","nodemon":"1.12.0","npm-check":"5.4.5","rimraf":"2.6.1","snyk":"1.40.2","ts-node":"3.3.0","tslint":"5.7.0","typescript":"2.5.2"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md CHANGELOG.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"nodemon --watch src --ext ts --exec 'npm test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov","npm-check":"npm-check --skip-unused"},"dependencies":{"validator":"8.1.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@3.0.0","_shasum":"bd0900dd5248039f6be447e0ee12f9249bb01a7b","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.10.1","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"bd0900dd5248039f6be447e0ee12f9249bb01a7b","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-3.0.0.tgz","integrity":"sha512-Ku9lVbonH3zrBda6Nt5e+g6i3FtXAIrMu+jGAOEKUC9bE6VgWDGxwVnTN2LCAO7Utfn51M0j3lzPksyO2YRggw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEbtVEr4p+A6MORGsd2Uajk9jHSQCP9ihc9XD7dW5PuAIgU8zKLIzc4lqcPrEwT5JN2DLnnooxJ6BRZwsoppUYzIE="}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fluent-ts-validator-3.0.0.tgz_1507066060997_0.572724066209048"},"directories":{}},"3.0.1":{"name":"fluent-ts-validator","version":"3.0.1","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.54","codecov":"2.3.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.8.0","jasmine-console-reporter":"2.0.1","jasmine-core":"2.8.0","jasmine-ts":"0.2.1","nodemon":"1.12.0","npm-check":"5.4.5","rimraf":"2.6.1","snyk":"1.40.2","ts-node":"3.3.0","tslint":"5.7.0","typescript":"2.5.2"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md CHANGELOG.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"nodemon --watch src --ext ts --exec 'npm test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov","npm-check":"npm-check --skip-unused"},"dependencies":{"validator":"8.1.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@3.0.1","_shasum":"f11d02fe17b4b1bbefd8c8a215f2af004ab2978c","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.10.1","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"f11d02fe17b4b1bbefd8c8a215f2af004ab2978c","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-3.0.1.tgz","integrity":"sha512-gWHls8tcAx24r9QkHMRvJ6mdFZ6l94LaWQAqX/vfT415kIj6Hn2eA+UesJHLoiFH1+6RcyCJlC7jaziO94Nyfg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICTD2cnt2x9XROSoz21m+2wEL8++gV5KBQyb3fkBSnA3AiEA389rAYPtxUfkMweZpzoAPv+dguElEyo1DmiP3ej2FMI="}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fluent-ts-validator-3.0.1.tgz_1511813435339_0.3753709038719535"},"directories":{}},"3.0.2":{"name":"fluent-ts-validator","version":"3.0.2","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"index.js","license":"MIT","devDependencies":{"@types/jasmine":"2.5.54","codecov":"2.3.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.8.0","jasmine-console-reporter":"2.0.1","jasmine-core":"2.8.0","jasmine-ts":"0.2.1","nodemon":"1.12.0","npm-check":"5.4.5","rimraf":"2.6.1","snyk":"1.40.2","ts-node":"3.3.0","tslint":"5.7.0","typescript":"2.5.2"},"scripts":{"build":"rimraf build && tsc && copyfiles package.json README.md CHANGELOG.md build","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"nodemon --watch src --ext ts --exec 'npm test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov","npm-check":"npm-check --skip-unused"},"dependencies":{"validator":"8.1.0"},"keywords":["typescript","validator","fluent API"],"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@3.0.2","_shasum":"484d47fd0683e8d36f90c3bff0092c94998fbe7f","_from":"build","_resolved":"file:build","_npmVersion":"4.2.0","_nodeVersion":"7.10.1","_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"dist":{"shasum":"484d47fd0683e8d36f90c3bff0092c94998fbe7f","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-3.0.2.tgz","integrity":"sha512-/IFtnl6hkFTmVm+sGxZp2vfIchu0SfFamenwtnrPEL7CV+hJa690uFRk4sNgqH7YJD7fnY7PpGkSXthF/z9bKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC8miFOtcdfMd7FPf3B6T//83dApQ+NEjdhpLmWPbpp+AiBYUQGNDt1+u6a+bWZCgowJWecFBZk5QD2lEy5m0/vjtw=="}]},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fluent-ts-validator-3.0.2.tgz_1515617818038_0.4134462010115385"},"directories":{}},"3.0.3":{"name":"fluent-ts-validator","version":"3.0.3","description":"A fluent validator written in TypeScript","author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"main":"dist/index.js","typings":"dist/index.d.ts","license":"MIT","devDependencies":{"@types/jasmine":"2.5.54","codecov":"2.3.0","copyfiles":"1.2.0","istanbul":"1.1.0-alpha.1","jasmine":"2.8.0","jasmine-console-reporter":"2.0.1","jasmine-core":"2.8.0","jasmine-ts":"0.2.1","nodemon":"1.12.0","npm-check":"5.4.5","rimraf":"2.6.1","snyk":"1.40.2","ts-node":"3.3.0","tslint":"5.7.0","typescript":"2.5.2"},"scripts":{"build":"rimraf dist && tsc","lint":"tslint --config ./tslint.json --project ./tsconfig.json","tdd":"nodemon --watch src --ext ts --exec 'npm test'","test":"jasmine-ts 'src/**/*.spec.ts'","test:coverage":"ts-node node_modules/.bin/istanbul cover -e .ts -x '*.spec.ts' node_modules/.bin/jasmine","test:snyk":"snyk test","test:snyk:dev":"snyk test --dev","codecov":"codecov","npm-check":"npm-check --skip-unused"},"dependencies":{"validator":"13.7.0"},"keywords":["typescript","validator","fluent API"],"gitHead":"e91980fa9634293b8c15d3b0f15b092331fca48f","bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","_id":"fluent-ts-validator@3.0.3","_nodeVersion":"14.18.3","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Fve4hwup4RML+dL63OVNzVdARQ9hO+1C+690wl6wiJ2Z+8rN4/THmpaGSVwswdiWIc9W9GPotot8nFH4flfjBQ==","shasum":"871ddd5f05f82168dfd9251c76690c18c1d2cfff","tarball":"https://registry.npmjs.org/fluent-ts-validator/-/fluent-ts-validator-3.0.3.tgz","fileCount":345,"unpackedSize":225027,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9EaACRA9TVsSAnZWagAADYYP/0ZFJCWGwzW9MnKB59wP\nbmnCn0ttWzn7NYdr5LEY9t4DdUZ3nwkQfZfr1a3M4Vw4ikFSnpH7CgOk7FAv\nz2LUgPatfKsg6fLFjpaquMuBQQmqPMbGQD+nUZNoioPJvsfrtPiOzzxXVpvK\nvbi+OHdDtocY4BTPAIAdKLpYg2ZvAvSKYfIUXPXET2zHBpeNbsE1Gl0mKeuk\naDio/Hd5odw+lw7+jC3TnZvOYemx97FeqPKqWVQ1lBOWWzEc9fUDb5in675v\nuekVnQDE2noWGWCPJb4Kv65O4L+vdBXT0CeoYf88pN/VKaNoGp/mQsw8qoz+\nLUxfGwl0bK8I4tu6DrI2ANgjA1m/rr8qoVxlivRHSHV96p5SijX4/7erJTtc\nDz3lYJnHq239V1N+tMHfzOQzJWtK2iX0H4Ngz1gGxNdm3yVBGpCNAneJgjCB\nePqFhbOT1PxyPilqDoALjv/ocq5PNQK7N4uTH9ly93pO3DhtCij2S1vTqbhI\n16HTrLwadITbcEqsTW+9KpRIwEo07R540yEWvhV8p3stP/FpIK4Ak5QIFixI\njVkYSo+YxWgJXTpVRvAEc8bfHZZBqIkplZBBkjm5VVjmwvbB3fUVK2lU0WM7\nPj0HsvG8FOsLUZA/FILmjWrUKFbsfHboVB5dRKfpL097rvLp3RPjVghjjyVb\n6grE\r\n=xmKn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC/WJD7Q7E9IiKsF/n7fuhAchz/cDu7QkWZEAa4vLmWSAiBC7rDygW3kiUdlCzpfhUw4k0niH2uj/KVBj1/3Y+bEIA=="}]},"_npmUser":{"name":"markusbohl","email":"markus.bohl@gmail.com"},"directories":{},"maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/fluent-ts-validator_3.0.3_1643398784682_0.021089525893682737"},"_hasShrinkwrap":false}},"readme":"[![Build Status](https://api.travis-ci.org/markusbohl/fluent-ts-validator.svg)](https://travis-ci.org/markusbohl/fluent-ts-validator)\n[![Code Coverage](https://codecov.io/gh/markusbohl/fluent-ts-validator/branch/master/graph/badge.svg)](https://codecov.io/gh/markusbohl/fluent-ts-validator)\n[![Code Climate](https://codeclimate.com/github/markusbohl/fluent-ts-validator/badges/gpa.svg)](https://codeclimate.com/github/markusbohl/fluent-ts-validator)\n[![Known Vulnerabilities](https://snyk.io/test/github/markusbohl/fluent-ts-validator/badge.svg)](https://snyk.io/test/github/markusbohl/fluent-ts-validator)\n\n\n# fluent-ts-validator\n\nA validation library written in TypeScript which uses a fluent API and lambda expressions \nto build validation rules. It is inspired by the [FluentValidation](https://github.com/JeremySkinner/FluentValidation) library for .NET written by Jeremy Skinner.\n\nInstead of implementing an awful lot of validation logic within this project again this library \nmakes use of the mature string validation library [validator.js](https://github.com/chriso/validator.js)\n and delegates invocations to it where it makes sense.\n\nIn this respect, special thanks go to these two projects.\n\nThe fluent-ts-validator library is licensed under [MIT](https://opensource.org/licenses/MIT). For past, current, and maybe upcoming changes take a look at the [Change Log](https://github.com/markusbohl/fluent-ts-validator/blob/develop/CHANGELOG.md).\n\n## Installation\n\n```bash\nnpm i fluent-ts-validator --save\n```\n\nor:\n\n```bash\nyarn add fluent-ts-validator\n```\n\n\n## Content\n- [Usage](#usage)\n    - [Basic Validation Example](#basic-validation-example)\n    - [Rule Building](#rule-building)\n        - [Building Blocks](#building-blocks)\n        - [Rule Concatenation](#rule-concatenation)\n        - [Validation Failure Configuration](#validation-failure-configuration)\n- [Validation Rules](#validation-rules)\n    - [Common Validation Rules](#common-validation-rules)\n    - [String Validation Rules](#string-validation-rules)\n    - [Number Validation Rules](#number-validation-rules)\n    - [Date Validation Rules](#date-validation-rules)\n    - [Type Validation Rules](#type-validation-rules)\n    - [Iterable Validation Rules](#iterable-validation-rules)\n    - [Custom Validation Rules](#custom-validation-rules)\n- [Validation Result & Validation Failures](#validation-result--validation-failures)\n- [Asynchronous Validation](#asynchronous-validation)\n- [Callbacks](#callbacks)\n\n\n## Usage\n\nCreating a validator for your needs is simply done by extending the `AbstractValidator<T>` \nclass for a specific type and defining a set of validation rules within the constructor of that \nclass. Then create an instance of that validator and invoke the `validate()` or `validateAsync()` \nmethod with an object you want to validate.  \n\n\n### Basic Validation Example\n\n```TypeScript\nimport {Superhero} from \"../models/superhero\";\nimport {AbstractValidator, Severity} from \"fluent-ts-validator\";\n\nexport class SuperheroValidator extends AbstractValidator<Superhero> {\n    constructor() {\n        super();\n        this.validateIfString(hero => hero.name)\n            .isAlphanumeric().hasMinLength(3)\n            .withFailureMessage(\"C'mon! At least some pronounceable name.\");\n\n        this.validateIf(hero => hero.superpowers)\n            .isNotEmpty()\n            .unless(hero => hero.immortal)\n            .withFailureCode(\"FAKE-001\")\n            .withSeverity(Severity.WARNING);\n\n        this.validateIfEachString(hero => hero.superpowers.map(power => power.description))\n            .hasLengthBetween(5, 50)\n            .when(hero => hero.superpowers != null);\n    }\n}\n\nconst hero: Superhero = ...;\nconst validator = new SuperheroValidator();\n\nconst result = validator.validate(hero);\nconst validationSucceeded = result.isValid();\nconst validationFailed = result.isInvalid();\nconst failures = result.getFailures();\nconst messages = result.getFailureMessages();\n```\n\n---\n\n__Pro Tip:__ Your custom `Validator` classes love to be transpiled to ES6 (at least). Otherwise, \nthey might throw things like `TypeError: Class constructor AbstractValidator cannot be invoked \nwithout 'new'` at you. Not nice! So make sure to set the compiler options in your `tsconfig.json`\n accordingly:\n\n```json\n{\n    \"compilerOptions\": {\n        \"target\": \"es6\",\n        \"module\": \"commonjs\",\n        ...\n    }\n}\n```\n\n---\n\n### Rule Building\nValidation rules are built in a fluent API style. Entry points are always the \ntype-based `validateIf` or `validateIfEach` kind of methods. These variants are available:\n- `validateIf`: for _common_ validation rules (independent of datatype)\n- `validateIfAny`: for _type_-based validation rules\n- `validateIfNumber`: for _number_-based validation rules\n- `validateIfDate`: for _Date_-based validation rules\n- `validateIfString`: for _String_-based validation rules\n- `validateIfIterable`: for _Iterable_-based validation rules\n- `validateIfEach`: same as `validateIf` but for `Iterables`\n- `validateIfEachAny`: same as `validateIfAny` but for `Iterables`\n- `validateIfEachNumber`: same as `validateIfNumber` but for `Iterables`\n- `validateIfEachDate`: same as `validateIfDate` but for `Iterables`\n- `validateIfEachString`: same as `validateIfString` but for `Iterables`\n\nAll of these methods expect a lambda expression as parameter which maps the input to specific \nvalidatable properties of that instance. Depending on the type of the validatable properties\ndifferent validation rules are available. The lambda expressions in the `validateIfEach`-methods \nmap to an instance that complies to the `Iterable` protocol. Obviously, all elements in an `Array`, \n`Set`, or whatever kind of `Iterable` will then be validated.\n\nFor example:\n\n```typescript\nexport class SuperheroValidator extends AbstractValidator<Superhero> {\n    constructor() {\n        super();\n        this.validateIfString(hero => hero.name).isAlphanumeric();\n        this.validateIfNumber(hero => hero.epicFightsWon).isGreaterThanOrEqual(3);\n        this.validateIfDate(hero => hero.lastSighting).isAfter(THEdate);\n    }\n}\n```\nAbove, `AbstractValidator` is typed with the `Superhero` class. So\nthe lamdba expressions expect instances of superheros. The type of the attribute to validate \ndetermines which `validateIf` method to use. So, checks on a superhero's name require the \n`validateIfString()` method, whether ensuring a superhero has won a certain amount of epic \nfights cries out for the `validateIfNumber()` method. In addition, the type of the attribute to \nvalidate also determines which kind of validation rules are available. While `isAlphanumeric()` \nmakes sense for a `string` it does not so much for a `Date` object. Using `isAfter(anotherDate)` is\nplausible for a date but not for a number, etc. \n\nOnly the types of validation rules that make sense for the attributes you are about to validate \nwill be available. And that is an _epic_ win for auto completion. A detailed overview of all \navailable validation options can be found in the [Validation Rules](#validation-rules) section \nbelow.\n\n#### Building Blocks\n\nOkay, to create your own validator start by subclassing the `AbstractValidator<T>` and specify the type `T` of objects you want to validate with it.\nWithin the constructor of your validator define the relevant validation steps:\n\n```typescript\nexport class SuperheroValidator extends AbstractValidator<Superhero> {\n    constructor() {\n        super();\n        this.validateIfString(hero => hero.name) // specify which property of which type needs validation\n            .isAlphanumeric().hasMinLength(3)    // validation rules to apply to the property\n            .whenNotNull()                       // validation conditions that might prevent validation\n            .withFailureCode(\"NAME-01\");         // configure parts of the failure object you receive upon failed validation\n    }\n}\n```\n\nThe building blocks of a validation step are:\n- `validateIf...()`-method which takes a lamba expression as parameter\n    - the lambda expression obviously maps from an object to a property. The property is eventually the thing you want to validate. \n- one or more validation rules (which depend on the type of the property)\n- optional validation conditions (to define under which circumstances the validation should be performed or omitted)\n- optional failure configurations (e.g. failure messages or codes you want to receive in case validation fails)\n\nValidation conditions and failure configurations can only be added after validation rules have been specified.\n\n#### Rule Concatenation\n\nValidation rules can also be concatenated.\n\n```typescript\nexport class SuperheroValidator extends AbstractValidator<Superhero> {\n    constructor() {\n        super();\n        this.validateIfString(hero => hero.name)\n            .isAlphanumeric().isUppercase().hasMinLength(3).isNotIn(arrayOfBadGuys);\n    }\n}\n```\n\n#### Conditional Validation\n\nSometimes, the necessity of validating a property depends on certain conditions. \nConditional rules allow you to specify under which circumstances a validation should be executed. That's the reason why you can append `whenDefined()`, `whenNotNull()`, `whenNotEmpty()` – or more general – `when()` or `unless()` methods to your \n validation rules. The three former ones come without method parameters. They internally make use of the lambda expression specified in the corresponding `validateIf()` method. However, `when()` and `unless()` expect a lambda expression as parameter that evaluates to a boolean \n value. When the lambda expression in a `when()` results in `true`, the validation is \n executed. With `unless()` it is the other way round. The validation does _not_ take place when \n the corresponding lambda expression evaluates to `true`.\n\n```typescript\nexport class SuperheroValidator extends AbstractValidator<Superhero> {\n    constructor() {\n        super();\n        this.validateIfString(hero => hero.name).isIn(hallOfFame)\n            .when(hero => hero.epicFightsWon > 100);\n\n        this.validateIf(hero => hero.superpowers).isNotEmpty()\n            .unless(hero => hero.immortal);\n        \n        this.validateIfDate(hero => hero.lastSighting).isAfter(THEdate)\n            .whenNotNull();\n    }\n}\n```\n\n- `whenDefined()`: validation is performed when `propertyUnderValidation` is not `undefined`\n- `whenNotNull()`: validation is performed when `propertyUnderValidation` is neither `undefined`, nor `null`\n- `whenNotEmpty()`: validation is performed when `propertyUnderValidation` is neither `undefined`, nor `null`, nor an empty `string` `\"\"`; this method is only available if the type of `propertyUnderValidation` is a `string`\n- `when(expression: (input: T) => boolean)`: validation is performed when expression evaluates to `true`\n- `unless(expression: (input: T) => boolean)`: validation is performed when expression evaluates to `false`\n\n##### Applying multiple conditions at once\n\nIn case more than one condition is defined for a validation step, they are logically ANDed to determine if the validation has to be performed. \nThat is, as soon as one condition fails, the corresponding validation rules are skipped.  \n\nFor example, the following `SuperheroValidator` only validates if a superhero's name is in some sort of Hall of Fame\n when the hero has won more than 100 epic fights _AND_ the hero's name is not empty:\n\n```typescript\nexport class SuperheroValidator extends AbstractValidator<Superhero> {\n    constructor() {\n        super();\n        this.validateIfString(hero => hero.name).isIn(hallOfFame)\n            .when(hero => hero.epicFightsWon > 100)\n            .whenNotEmpty();\n    }\n}\n```\n\n#### Validation Failure Configuration\n\nEventually, the appearance of validation failures can be configured on a per-property basis. In \ncase an _invalid_ object is passed to the `validate()` or `validateAsync()` method, you might be \ninterested in details about the failure, possibly react to it, or pass some failure-specific \ninformation along. For details about the various methods see [Validation Result & Validation Failures](#validation-result--validation-failures).\n\n```typescript\nexport class SuperheroValidator extends AbstractValidator<Superhero> {\n    constructor() {\n        super();\n        this.validateIfNumber(hero => hero.epicFightsWon).isNotEqualTo(0)\n            .withSeverity(Severity.INFO)\n            .withFailureCode(\"F_0\")\n            .withFailureMessage(\"Don't give up!\")\n            .onFailure(failure => console.log(failure));\n    }\n}\n```\n\n## Validation Rules\n\nOn the one hand this library provides validation rules that are specific to a property's type \n([String](#string-validation-rules), [Number](#number-validation-rules), [Date](#date-validation-rules), and [Iterable Validation Rules](#iterable-validation-rules)). \nOn the other hand there are rules that can be applied irrespectively of a property's type ([Common](#common-validation-rules) and [Type Validation Rules](#type-validation-rules)). \n\n### Common Validation Rules\n\nCommon validation rules are applicable to properties of all types.\n\n#### Methods\n\n- `isDefined()`: Checks if a property is defined. \n- `isUndefined()`: Checks if a property is undefined.\n- `isNull()`: Checks if a property is null.\n- `isNotNull()`: Checks if a property is not null.\n- `isEmpty()`: Checks if a property is empty. \n    - Empty in this context means either an empty `string`, `null`, or `undefined`. Or in case of \ncollections (`Array`, `Set`, `Map`) that they do not contain any element (`length === 0`, `size \n=== 0`)\n- `isNotEmpty()`: Checks if a property is not empty. \n    - That is, neither `null` nor `undefined` and not an empty `string`. If the property in \n    question is a collection (`Array`, `Set`, `Map`) this method checks if the collection contains elements.\n- `isEqualTo(comparison: TProperty)`: Checks if a property is equal to (`===`) the `comparison`\n parameter. \n- `isNotEqualTo(comparison: TProperty)`: Checks if a property is not equal to (`!==`) the \n`comparison` parameter.\n- `isIn(obj: Iterable<TProperty> | object)`: In case an iterable is provided, checks if a property is equal to an element of the \niterable (`===`). For non-iterables, checks if a member's value is equal to the property under validation.\n- `isNotIn(obj: Iterable<TProperty> | object)`: In case an iterable is provided, checks if a property is not equal to an element \nof the iterable (`!==`). For non-iterables, checks if no member's value is equal to the property under validation.\n\n\n### String Validation Rules\n\nThe largest group of validation rules targets properties of type `string`. Most of these rules \ndelegate the actual validation to the internal [validator.js](https://github.com/chriso/validator.js) library.\n\n#### Methods\n\n- `contains(seed: string)`: Checks if a string contains a substring or `seed`.\n- `hasLength(length: number)`: Checks if a string has exactly the length `length`.\n- `hasLengthBetween(min: number, max: number)`: Checks if a string falls in a the `min` - `max` \nrange. \n- `hasMinLength(min: number)`: Checks if a string has at least `min` length.\n- `hasMaxLength(max: number)`: Checks if a string has at most `max` length.\n- `isAlpha(locale?: AlphaLocale)`: Checks if a string contains letters (a-zA-Z) only. \n    - an optional locale can be set, which is  one of `AlphaLocale = \"ar\" | \"ar-AE\" | \"ar-BH\" | \n    \"ar-DZ\" | \"ar-EG\" |\n  \"ar-IQ\" | \"ar-JO\" | \"ar-KW\" | \"ar-LB\" | \"ar-LY\" | \"ar-MA\" | \"ar-QA\" | \"ar-QM\" | \"ar-SA\" | \n  \"ar-SD\" | \"ar-SY\" | \"ar-TN\" | \"ar-YE\" | \"cs-CZ\" | \"de-DE\" | \"en-AU\" | \"en-GB\" | \"en-HK\" | \n  \"en-IN\" | \"en-NZ\" | \"en-US\" | \"en-ZA\" | \"en-ZM\" | \"es-ES\" | \"fr-FR\" | \"hu-HU\" | \"nb-NO\" | \"nl-NL\" | \n  \"nn-NO\" | \"pl-PL\" | \"pt-BR\" | \"pt-PT\" | \"ru-RU\" | \"sr-RS\" | \"sr-RS@latin\" | \"tr-TR\";` if not set, defaults\n   to `en-US`.\n- `isAlphanumeric(locale?: AlphanumericLocale)`: Checks if a string is alphanumeric.\n    - an optional locale can be set. It accepts a locale of\n    `AlphanumericLocale = \"ar\" | \"ar-AE\" | \"ar-BH\" | \"ar-DZ\" | \"ar-EG\" | \"ar-IQ\" | \"ar-JO\" | \n    \"ar-KW\" | \"ar-LB\" | \"ar-LY\" | \"ar-MA\" | \"ar-QA\" | \"ar-QM\" | \"ar-SA\" | \"ar-SD\" | \"ar-SY\" | \n    \"ar-TN\" | \"ar-YE\" | \"cs-CZ\" | \"de-DE\" | \"en-AU\" | \"en-GB\" | \"en-HK\" | \"en-IN\" | \"en-NZ\" | \n    \"en-US\" | \"en-ZA\" | \"en-ZM\" | \"es-ES\" | \"fr-FR\" | \"fr-BE\" | \"hu-HU\" | \"nl-BE\" | \"nb-NO\" | \"nl-NL\" | \n    \"nn-NO\" | \"pl-PL\" | \"pt-BR\" | \"pt-PT\" | \"ru-RU\" | \"sr-RS\" | \"sr-RS@latin\" | \"tr-TR\";` defaults to `en-US`\n- `isAscii()`: Checks if a string contains ASCII chars only.\n- `isBase64()`: Checks if a string is Base64 encoded.\n- `isBooleanString()`: Checks if a string is a boolean.\n- `isCurrency(options?: CurrencyOptions)`: Checks if a string is a valid currency amount.\n    - the optional parameter defaults to `CurrencyOptions: {\n    symbol: '$', \n    require_symbol: false, \n    allow_space_after_symbol: \n    false, symbol_after_digits: false, \n    allow_negatives: true, \n    parens_for_negatives: false, \n    negative_sign_before_digits: false, \n    negative_sign_after_digits: false, \n    allow_negative_sign_placeholder: false, \n    thousands_separator: ',', \n    decimal_separator: '.', \n    allow_space_after_digits: false \n    }`\n- `isDecimalString()`: Checks if a string represents a decimal number, such as 0.1, .3, 1.1, 1\n.00003, 4.0, etc.\n- `isEmail(options?: EmailOptions)`: Checks if a string is an email.\n    - the optional parameter defaults to `EmailOptions: { allow_display_name: false, \n    require_display_name: false, allow_utf8_local_part: true, require_tld: true }`. \n    - if `allow_display_name` is set to `true`, the validator will also match `Display Name \n    <email-address>`. If `require_display_name` is set to true, the validator will reject strings without the format `Display Name <email-address>`. If `allow_utf8_local_part` is set to `false`, the validator will not allow any non-English UTF8 character in email address' local part. If `require_tld` is set to `false`, e-mail addresses without having TLD in their domain will also be matched.\n- `isFqdn(options?: FqdnOptions)`: Checks if a string is a fully qualified domain name (e.g. \ndomain.com). \n    - the optional parameter is an option that defaults to `FqdnOptions: { require_tld: true, allow_underscores: false, allow_trailing_dot: false }`.\n- `isHexadecimal()`: Checks if a string is a hexadecimal number.\n- `isIso8601()`: Checks if a string is a valid ISO 8601 date.\n- `isJson()`: Check if a string is valid JSON (note: uses JSON.parse).\n- `isLatLong()`: Checks if a string represents valid latitude-longitude coordinates.\n- `isLowercase()`: Checks if a string is all lowercase.\n- `isMobilePhoneNo(locale: MobilePhoneLocale)`: Checks if a string is a mobile phone number.\n    - the `locale` is one of `MobilePhoneLocale = \"ar-DZ\" | \"ar-SA\" | \"ar-SY\" | \"cs-CZ\" | \"da-DK\" | \"de-DE\" | \"el-GR\" | \"en-AU\" | \"en-CA\" | \"en-GB\" | \"en-HK\" | \"en-IN\" | \"en-KE\" | \"en-NZ\" | \"en-RW\" | \"en-TZ\" | \"en-UG\" | \"en-US\" | \"en-ZA\" | \"en-ZM\" | \"es-ES\" | \"fa-IR\" | \"fi-FI\" | \"fr-FR\" | \"hu-HU\" | \"id-ID\" | \"it-IT\" | \"ja-JP\" | \"lt-LT\" | \"ms-MY\" | \"nb-NO\" | \"nn-NO\" | \"pl-PL\" | \"pt-PT\" | \"ru-RU\" | \"sr-RS\" | \"tr-TR\" | \"vi-VN\" | \"zh-CN\" | \"zh-TW\";`\n- `isNumericString()`: Checks if a string contains only numbers.\n- `isPostalCode(locale: PostalCodeLocale)`: Checks if a string is a postal code.\n    - the `locale` is one of `PostalCodeLocale = \"AT\" | \"AU\" | \"BE\" | \"CA\" | \"CH\" | \"CZ\" | \"DE\" | \"DK\" | \"DZ\" | \"ES\" | \"FI\" | \"FR\" | \"GB\" | \"GR\" | \"IL\" | \"IN\" | \"IS\" | \"IT\" | \"JP\" | \"KE\" | \"LI\" | \"MX\" | \"NL\" | \"NO\" | \"PL\" | \"PT\" | \"RO\" | \"RU\" | \"SA\" | \"SE\" | \"TW\" | \"US\" | \"ZA\" | \"ZM\";` OR `\"any\"`. If `\"any\"` is used, the underlying validator.js library will check if any of the locales match.\n- `isUppercase()`: Checks if a string is all uppercase.\n- `isUrl(options?: UrlOptions)`: Checks if a string is a URL.\n    - the optional parameter defaults to `UrlOptions: { protocols: ['http','https','ftp'], require_tld: true, require_protocol: false, require_host: true, require_valid_protocol: true, allow_underscores: false, host_whitelist: false, host_blacklist: false, allow_trailing_dot: false, allow_protocol_relative_urls: false }`\n- `isUuid(version?: UuidVersion)`: Checks if a string is a UUID.\n    - Optional `version` is one value of `UuidVersion = \"3\" | \"4\" | \"5\" | \"all\";`\n    - defaults to `all`\n- `matches(pattern: RegExp, modifiers?: string)`: Checks if a string matches a pattern.\n    - optional `modifiers` are the same as a `RegExp` constructor would accept (e.g. `\"i\"` for \n    _ignore case_, or `\"g\"` for _global match_, etc.) \n\n\n### Number Validation Rules\n\nValidation rules for properties of type `number`.\n\n#### Methods\n\n- `isPositive()`: Checks if a number is positive (`> 0`).\n- `isNegative()`: Checks if a number is negative (`< 0`).\n- `isGreaterThan(threshold: number)`: Checks if a number is greater than `threshold` (`>`).\n- `isGreaterThanOrEqual(threshold: number)`: Checks if a number is greater than or equal to\n`threshold` (`>=`).\n- `isLessThan(threshold: number)`: Checks if a number is less than `threshold` (`<`).\n- `isLessThanOrEqual(threshold: number)`: Checks if a number is less than or equal to `threshold`\n (`<=`).\n\n### Date Validation Rules\n\nValidation rules for properties of type `Date`.\n\n#### Methods\n\n- `isBefore(date: Date)`: Checks if a date is before `date`.\n- `isSameAs(date: Date)`: Checks if a date is the same as `date`.\n- `isAfter(date: Date)`: Checks if a date is after `date`.\n- `isSameOrBefore(date: Date)`: Checks if a date is the same as or before `date`.\n- `isSameOrAfter(date: Date)`: Checks if a date is the same as or after `date`.\n- `isBetween(date1: Date, date2: Date, lowerBoundary?: \"(\" | \"[\", upperBoundary?: \")\" | \"]\")`: \nChecks if a date is between `date1` and `date2`.\n    - uses the same boundary characters as [moment.js](https://momentjs.com/docs/#/query/is-between/)\n    - `[` and `]` indicate inclusion of a date \n    - `(` and `)` indicates exclusion of a date\n    - defaults to exclusion of lower and upper boundary if not specified\n\n\n### Type Validation Rules\n\nValidation rules to check for certain types.\n\n#### Methods\n\n- `isArray()`: Checks if a property is of type `Array`.\n- `isBoolean()`: Checks if a property is a real `boolean`.\n- `isDate()`: Checks if a property is of type `Date`.\n- `isNumber()`: Checks if a property is a real `number`.\n- `isString()`: Checks if a property is a real `string`.\n\n\n### Iterable Validation Rules\n\nValidation rules for iterable properties.\n\n#### Methods\n\n- `isEmpty()`: Checks if an `Iterable` does not have an element.\n- `isNotEmpty()`: Checks if an `Iterable` has at least one element.\n- `hasNumberOfElements(elementCount: number)`: Checks if an `Iterable` has exact `elementCount` elements.\n- `hasMinNumberOfElements(min: number)`: Checks if an `Iterable` has at least `min` elements.\n- `hasMaxNumberOfElements(max: number)`: Checks if an `Iterable` has at most `max` elements.\n- `hasNumberOfElementsBetween(min: number, max: number)`: Checks if an `Iterable` has at least `min` and at most `max` elements.\n- `contains(element: TProperty)`: Checks if an `Iterable` contains the specified `element`.\n- `doesNotContain(element: TProperty)`: Checks if an `Iterable` does not contain the specified `element`.\n\n### Custom Validation Rules\n\nSometimes it is useful to reuse one of your validators within a different validator. This is \nwhere the `fulfills` method comes in handy:\n\n```typescript\nexport class SuperpowerValidator extends AbstractValidator<Superpower> {\n    constructor() {\n        super();\n        this.validateIf(superpower => superpower.type).isNotEmpty();\n    }\n}\n\nexport class SuperheroValidator extends AbstractValidator<Superhero> {\n    constructor() {\n        super();\n        this.validateIfEach(hero => hero.superpowers).fulfills(new SuperpowerValidator());\n    }\n}\n```\n\nThe `fulfills` method is actually overloaded which allows us to use it for our own validation \nexpressions as well. In case the provided validation rules just don't fit your needs, be a \n_Superhero_ and formulate your own validation expression:\n\n```typescript\nexport class SuperheroValidator extends AbstractValidator<Superhero> {\n    constructor() {\n        super();\n        this.validateIf(hero => hero.name).fulfills(name => {\n            return !(name.includes('SUPER') || name.includes('BAT'));\n        });\n    }\n}\n```\n\n## Validation Result & Validation Failures\n\nEach validator created with this library returns a `ValidationResult` object at the end of the \nvalidation process. It contains some information regarding the validation process you are probably very interested in.\nIts methods are:\n\n- `isValid(): boolean`\n    - returns `true` if no `ValidationFailure` exists, `false` otherwise.\n- `isInvalid(): boolean`\n    - returns `true` if at least one `ValidationFailure` exists, `false` otherwise.\n- `getFailures(): ValidationFailure[]`\n    - returns an array containing `ValidationFailures` for the invalid properties. If no \n    failures exist, meaning the result is valid, an empty array is returned.\n- `getFailureMessages(): string[]`\n    - collects all the non-empty failure messages of all validation failures and returns them in one array; if no validation failures exist, an empty array is returned\n- `getFailureCodes(): string[]`\n    - collects all the non-empty failure codes of all validation failures and returns them in one array; if no validation failures exist, an empty array is returned\n\nSo, what is a `ValidationFailure`? It is an object with the following properties (all of them \nbeing _readonly_):\n\n- `target: any`: the object as a whole that was validated\n- `propertyName: string`: the name of the property that is considered invalid\n- `attemptedValue: any`: the actual value of the property that is considered invalid\n- `code: string`: a failure code, if set; otherwise `undefined`\n- `message: string`: a failure message; if not explicitly set, it defaults to '`<propertyName>` is\n invalid'\n- `severity: string`: the severity of the failure; defaults to `ERROR`\n\nThe following methods can be used to influence the appearance of a `ValidationFailure`:  \n- `withFailureCode(code: string)`: sets a failure code\n- `withFailureMessage(message: string)`: sets a failure message\n- `withSeverity(severity: Severity)`: sets the severity\n    - `Severity` is an `enum` with the possible values `ERROR`, `WARNING`, or `INFO`\n    - defaults to `ERROR` if not set\n- `withPropertyName(name: string)`: sets a name for the property under validation\n    - although _fluent-ts-validator_ tries its best to automatically detect the name of the \n    properties under validation it might sometimes be useful to set the name explicitly. For \n    example, in case an uglifier scrambles the code and throws original property names out of the\n    window.\n\nTo make the relationship between a `Validator` and a `ValidationFailure` clear, take a look at the \nfollowing `SuperheroValidator` and `Superhero` instance:\n\n```typescript\nexport class SuperheroValidator extends AbstractValidator<Superhero> {\n    constructor() {\n        super();\n        this.validateIfNumber(superhero => superhero.epicFightsWon).isNotEqualTo(0)\n            .withSeverity(Severity.INFO)\n            .withFailureCode(\"F_0\")\n            .withFailureMessage(\"Don't give up!\");\n    }\n}\n\nconst superhero = new Superhero();\nsuperhero.name = \"SUPER DUDE\";\nsuperhero.epicFightsWon = 0;\n\nconst validator = new SuperheroValidator();\nconst result = validator.validate(superhero);\n```\n\nThe `ValidationResult` will contain a `ValidationFailure` object in its array that looks like this:\n\n```typescript\nValidationFailure {\n  target: Superhero { name: 'SUPER DUDE', epicFightsWon: 0 },\n  propertyName: 'epicFightsWon',\n  attemptedValue: 0,\n  code: 'F_0',\n  message: 'Don\\'t give up!',\n  severity: 'INFO'\n}\n```\nThat makes it obvious which object failed validation due to which property and value.\n\n\n## Asynchronous Validation\n\nA validation can also be performed asynchronously. Besides the `validate` method every validator \nprovides a `validateAsync` method which returns a `Promise` for a `ValidationResult`.\n\n```typescript\nconst promise: Promise<ValidationResult> = validator.validateAsync(superhero);\n\npromise.then(result => console.log(result.isValid()));\n```\n\n## Callbacks\n\nIn case you want to respond to failures immediately callbacks can be used. Just use the \n`onFailure()` method when building your validation rule. It accepts a callback-method as parameter \nwith the following signature: `(failure: ValidationFailure) => void`\n\n```typescript\nexport class SuperheroValidator extends AbstractValidator<Superhero> {\n    constructor() {\n        super();\n        this.validateIfString(superhero => superhero.name).isEqualTo(\"The DUDE\")\n            .onFailure(failure => console.log(\"We have found his Dudeness!\"));\n    }\n}\n```\n","maintainers":[{"name":"markusbohl","email":"markus.bohl@gmail.com"}],"time":{"modified":"2022-06-18T02:25:09.625Z","created":"2017-04-11T21:37:40.519Z","1.0.0-rc.3":"2017-04-11T21:37:40.519Z","1.0.0-rc.5":"2017-04-11T22:47:53.078Z","1.0.0":"2017-04-17T19:59:15.510Z","1.1.0":"2017-04-23T14:35:54.993Z","1.1.1":"2017-05-06T17:01:02.648Z","2.0.0":"2017-05-14T19:15:11.892Z","2.0.1":"2017-05-22T18:44:12.257Z","2.1.0":"2017-06-10T23:03:37.522Z","2.1.1":"2017-08-27T15:22:40.159Z","2.1.2":"2017-08-28T18:06:03.258Z","3.0.0-rc.1":"2017-09-06T13:16:14.297Z","3.0.0":"2017-10-03T21:27:42.415Z","3.0.1":"2017-11-27T20:10:36.596Z","3.0.2":"2018-01-10T20:56:59.360Z","3.0.3":"2022-01-28T19:39:44.909Z"},"homepage":"https://github.com/markusbohl/fluent-ts-validator#readme","keywords":["typescript","validator","fluent API"],"repository":{"type":"git","url":"git+https://github.com/markusbohl/fluent-ts-validator.git"},"author":{"name":"Markus Bohl","email":"markus.bohl@gmail.com"},"bugs":{"url":"https://github.com/markusbohl/fluent-ts-validator/issues"},"license":"MIT","readmeFilename":"README.md"}