UNPKG

validator.js-asserts

Version:
331 lines (210 loc) 21.6 kB
# Changelog ## [v10.0.0](https://github.com/uphold/validator.js-asserts/releases/tag/v10.0.0) (2025-11-19) - Restore original `BigNumber.DEBUG` value after the asserts [\#270](https://github.com/uphold/validator.js-asserts/pull/270) ([goncalvesnelson](https://github.com/goncalvesnelson)) - Update UUID assert to include `v7`, `max`, and `nil` [\#264](https://github.com/uphold/validator.js-asserts/pull/264) ([risantos](https://github.com/risantos)) ## [v9.0.0](https://github.com/uphold/validator.js-asserts/releases/tag/v9.0.0) (2025-07-01) - Add type declarations [\#259](https://github.com/uphold/validator.js-asserts/pull/259) ([risantos](https://github.com/risantos)) - Improve `README` [\#265](https://github.com/uphold/validator.js-asserts/pull/265) ([risantos](https://github.com/risantos)) - Fix `peerDependencies` [\#263](https://github.com/uphold/validator.js-asserts/pull/263) ([risantos](https://github.com/risantos)) - Update dev dependencies to fix vulnerabilities [\#262](https://github.com/uphold/validator.js-asserts/pull/262) ([risantos](https://github.com/risantos)) - Replace `uphold-scripts` with `@fastify/pre-commit` [\#261](https://github.com/uphold/validator.js-asserts/pull/261) ([risantos](https://github.com/risantos)) - Replace `jest` and `sinon` with `node:test` [\#260](https://github.com/uphold/validator.js-asserts/pull/260) ([risantos](https://github.com/risantos)) - Update `ESLint` configuration and lint files [\#257](https://github.com/uphold/validator.js-asserts/pull/257) ([risantos](https://github.com/risantos)) - Add `CODEOWNERS` [\#258](https://github.com/uphold/validator.js-asserts/pull/258) ([risantos](https://github.com/risantos)) ## [v8.4.0](https://github.com/uphold/validator.js-asserts/releases/tag/v8.4.0) (2025-01-22) - Add Canada zip code assert [\#253](https://github.com/uphold/validator.js-asserts/pull/253) ([Megamind51](https://github.com/Megamind51)) ## [v8.3.0](https://github.com/uphold/validator.js-asserts/releases/tag/v8.3.0) (2025-01-10) - Bypass email validation for deleted emails [\#254](https://github.com/uphold/validator.js-asserts/pull/254) ([Megamind51](https://github.com/Megamind51)) ## [v8.2.0](https://github.com/uphold/validator.js-asserts/releases/tag/v8.2.0) (2024-07-08) - Bump google-libphonenumber@3.2.35 [\#250](https://github.com/uphold/validator.js-asserts/pull/250) ([rbrtribeiro](https://github.com/rbrtribeiro)) ## [v8.1.0](https://github.com/uphold/validator.js-asserts/releases/tag/v8.1.0) (2024-07-08) - Add RFC assert [\#251](https://github.com/uphold/validator.js-asserts/pull/251) ([Prado](https://github.com/Prado)) ## [v8.0.0](https://github.com/uphold/validator.js-asserts/releases/tag/v8.0.0) (2024-07-02) - Fix github release action [\#248](https://github.com/uphold/validator.js-asserts/pull/248) ([satazor](https://github.com/satazor)) - Lock release-it@17.0.1 [\#249](https://github.com/uphold/validator.js-asserts/pull/249) ([franciscocardoso](https://github.com/franciscocardoso)) - Fix release process instructions [\#247](https://github.com/uphold/validator.js-asserts/pull/247) ([franciscocardoso](https://github.com/franciscocardoso)) - Add GitHub release workflow [\#246](https://github.com/uphold/validator.js-asserts/pull/246) ([franciscocardoso](https://github.com/franciscocardoso)) - Add CURP assert [\#245](https://github.com/uphold/validator.js-asserts/pull/245) ([Prado](https://github.com/Prado)) ## [7.4.0](https://github.com/uphold/validator.js-asserts/releases/tag/v7.4.0) (2023-01-31) - Add `NullOrAssert` [\#149](https://github.com/uphold/validator.js-asserts/pull/149) ([rplopes](https://github.com/rplopes)) - Add github actions CI [\#219](https://github.com/uphold/validator.js-asserts/pull/219) ([diogotorres97](https://github.com/diogotorres97)) ## [7.3.1](https://github.com/uphold/validator.js-asserts/releases/tag/v7.3.1) (2022-04-27) - Add support for numbers to be in callback assert custom class [\#228](https://github.com/uphold/validator.js-asserts/pull/228) ([justinweathersby](https://github.com/justinweathersby)) ## [7.3.0](https://github.com/uphold/validator.js-asserts/releases/tag/v7.3.0) (2022-03-29) - Add CPF taxpayer identification number assert [\#223](https://github.com/uphold/validator.js-asserts/pull/223) ([acostalima](https://github.com/acostalima)) ## [7.2.0](https://github.com/uphold/validator.js-asserts/releases/tag/v7.2.0) (2021-11-16) - Add uphold-scripts@0.5.0 [\#210](https://github.com/uphold/validator.js-asserts/pull/210) ([diogotorres97](https://github.com/diogotorres97)) - Updates dev dependencies [\#218](https://github.com/uphold/validator.js-asserts/pull/218) ([JerrySievert](https://github.com/JerrySievert)) - Improve optional dependency performance [\#200](https://github.com/uphold/validator.js-asserts/pull/200) ([nunofgs](https://github.com/nunofgs)) ## [v7.1.0](https://github.com/uphold/validator.js-asserts/tree/v7.1.0) (2021-07-02) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v7.0.0...v7.1.0) **Merged pull requests:** - Bump lodash@4.17.21 [\#208](https://github.com/uphold/validator.js-asserts/pull/208) ([diogotorres97](https://github.com/diogotorres97)) - Add `nullOrBoolean` assert [\#207](https://github.com/uphold/validator.js-asserts/pull/207) ([diogotorres97](https://github.com/diogotorres97)) ## [v7.0.0](https://github.com/uphold/validator.js-asserts/tree/v7.0.0) (2020-10-30) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v6.0.0...v7.0.0) **Merged pull requests:** - Improve custom class validation [\#196](https://github.com/uphold/validator.js-asserts/pull/196) ([afsampaio](https://github.com/afsampaio)) - Update README with new callback usage [\#195](https://github.com/uphold/validator.js-asserts/pull/195) ([diogotorres97](https://github.com/diogotorres97)) - Improve callback assert to ensure an error class [\#194](https://github.com/uphold/validator.js-asserts/pull/194) ([diogotorres97](https://github.com/diogotorres97)) ## [v6.0.0](https://github.com/uphold/validator.js-asserts/tree/v6.0.0) (2020-03-19) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v5.0.0...v6.0.0) **Implemented enhancements:** - Update bignumber.js@9.0.0 [\#189](https://github.com/uphold/validator.js-asserts/pull/189) ([afsampaio](https://github.com/afsampaio)) ## [v5.0.0](https://github.com/uphold/validator.js-asserts/tree/v5.0.0) (2020-03-02) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/3.2.0...v5.0.0) **Merged pull requests:** - Bump validator.js [\#187](https://github.com/uphold/validator.js-asserts/pull/187) ([cristianooliveira](https://github.com/cristianooliveira)) ## [3.2.0](https://github.com/uphold/validator.js-asserts/tree/3.2.0) (2020-02-04) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v3.1.2...3.2.0) **Implemented enhancements:** - Add callback assert [\#185](https://github.com/uphold/validator.js-asserts/pull/185) ([cristianooliveira](https://github.com/cristianooliveira)) **Merged pull requests:** - Add callback assert [\#186](https://github.com/uphold/validator.js-asserts/pull/186) ([cristianooliveira](https://github.com/cristianooliveira)) ## [v3.1.2](https://github.com/uphold/validator.js-asserts/tree/v3.1.2) (2020-01-31) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v3.1.1...v3.1.2) **Merged pull requests:** - Change node support to be above v8 and update travis build file [\#184](https://github.com/uphold/validator.js-asserts/pull/184) ([cristianooliveira](https://github.com/cristianooliveira)) - Bump validator.js and add yarn.lock [\#183](https://github.com/uphold/validator.js-asserts/pull/183) ([cristianooliveira](https://github.com/cristianooliveira)) - Bump dependencies [\#182](https://github.com/uphold/validator.js-asserts/pull/182) ([Americas](https://github.com/Americas)) ## [v3.1.1](https://github.com/uphold/validator.js-asserts/tree/v3.1.1) (2019-10-08) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v4.0.2...v3.1.1) ## [v4.0.2](https://github.com/uphold/validator.js-asserts/tree/v4.0.2) (2019-10-08) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v4.0.1...v4.0.2) **Fixed bugs:** - Fix Bank Identifier Code assert [\#181](https://github.com/uphold/validator.js-asserts/pull/181) ([pedrobranco](https://github.com/pedrobranco)) **Merged pull requests:** - Add MIT license [\#179](https://github.com/uphold/validator.js-asserts/pull/179) ([zangetsouu](https://github.com/zangetsouu)) ## [v4.0.1](https://github.com/uphold/validator.js-asserts/tree/v4.0.1) (2019-06-05) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v4.0.0...v4.0.1) **Fixed bugs:** - Date asserts are not working correctly on node 10 and above [\#175](https://github.com/uphold/validator.js-asserts/issues/175) **Merged pull requests:** - Fix date tests on node 10 [\#178](https://github.com/uphold/validator.js-asserts/pull/178) ([rplopes](https://github.com/rplopes)) ## [v4.0.0](https://github.com/uphold/validator.js-asserts/tree/v4.0.0) (2019-02-18) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v3.1.0...v4.0.0) **Implemented enhancements:** - Support bignumber.js@7+ and add optional `validateSignificantDigits` flag [\#174](https://github.com/uphold/validator.js-asserts/pull/174) ([ricardobcl](https://github.com/ricardobcl)) **Merged pull requests:** - Update google-libphonenumber [\#173](https://github.com/uphold/validator.js-asserts/pull/173) ([rplopes](https://github.com/rplopes)) - Fix mixed content issue preventing page load [\#170](https://github.com/uphold/validator.js-asserts/pull/170) ([hitmanmcc](https://github.com/hitmanmcc)) - Update ownership [\#169](https://github.com/uphold/validator.js-asserts/pull/169) ([ruimarinho](https://github.com/ruimarinho)) - Update README to include new asserts [\#165](https://github.com/uphold/validator.js-asserts/pull/165) ([kurayama](https://github.com/kurayama)) ## [v3.1.0](https://github.com/uphold/validator.js-asserts/tree/v3.1.0) (2016-10-20) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v3.0.2...v3.1.0) **Implemented enhancements:** - New date asserts [\#164](https://github.com/uphold/validator.js-asserts/pull/164) ([kurayama](https://github.com/kurayama)) ## [v3.0.2](https://github.com/uphold/validator.js-asserts/tree/v3.0.2) (2016-10-10) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v3.0.1...v3.0.2) **Closed issues:** - Incorrect documentation for `Uuid` assert [\#148](https://github.com/uphold/validator.js-asserts/issues/148) **Merged pull requests:** - Allow custom date formats [\#150](https://github.com/uphold/validator.js-asserts/pull/150) ([kurayama](https://github.com/kurayama)) ## [v3.0.1](https://github.com/uphold/validator.js-asserts/tree/v3.0.1) (2016-08-04) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v3.0.0...v3.0.1) **Implemented enhancements:** - Add `BigNumberEqualTo` assert [\#117](https://github.com/uphold/validator.js-asserts/pull/117) ([nunofgs](https://github.com/nunofgs)) ## [v3.0.0](https://github.com/uphold/validator.js-asserts/tree/v3.0.0) (2016-05-13) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v2.3.1...v3.0.0) **Implemented enhancements:** - Update validator.js@2.0.0 [\#110](https://github.com/uphold/validator.js-asserts/pull/110) ([ruimarinho](https://github.com/ruimarinho)) ## [v2.3.1](https://github.com/uphold/validator.js-asserts/tree/v2.3.1) (2016-04-29) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v2.3.0...v2.3.1) **Merged pull requests:** - Update uk-modulus-checking@0.0.3 [\#105](https://github.com/uphold/validator.js-asserts/pull/105) ([promag](https://github.com/promag)) - Update dependencies [\#103](https://github.com/uphold/validator.js-asserts/pull/103) ([ruimarinho](https://github.com/ruimarinho)) ## [v2.3.0](https://github.com/uphold/validator.js-asserts/tree/v2.3.0) (2016-04-14) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v2.2.0...v2.3.0) **Implemented enhancements:** - Add Taxpayer Identification Number assert [\#66](https://github.com/uphold/validator.js-asserts/pull/66) ([nunofgs](https://github.com/nunofgs)) ## [v2.2.0](https://github.com/uphold/validator.js-asserts/tree/v2.2.0) (2016-04-10) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v2.1.0...v2.2.0) **Implemented enhancements:** - Add note about `Date` assert requiring `moment` for format validation [\#97](https://github.com/uphold/validator.js-asserts/pull/97) ([ruimarinho](https://github.com/ruimarinho)) **Merged pull requests:** - Add UkModulusChecking assert [\#79](https://github.com/uphold/validator.js-asserts/pull/79) ([franciscocardoso](https://github.com/franciscocardoso)) ## [v2.1.0](https://github.com/uphold/validator.js-asserts/tree/v2.1.0) (2016-04-10) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v2.0.2...v2.1.0) **Merged pull requests:** - Add release instructions [\#96](https://github.com/uphold/validator.js-asserts/pull/96) ([ruimarinho](https://github.com/ruimarinho)) - Add format option to date assert [\#95](https://github.com/uphold/validator.js-asserts/pull/95) ([franciscocardoso](https://github.com/franciscocardoso)) ## [v2.0.2](https://github.com/uphold/validator.js-asserts/tree/v2.0.2) (2016-04-06) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v2.0.1...v2.0.2) **Implemented enhancements:** - Add automated releases [\#74](https://github.com/uphold/validator.js-asserts/pull/74) ([ruimarinho](https://github.com/ruimarinho)) **Merged pull requests:** - Update dependencies [\#94](https://github.com/uphold/validator.js-asserts/pull/94) ([ruimarinho](https://github.com/ruimarinho)) - Update dependencies [\#73](https://github.com/uphold/validator.js-asserts/pull/73) ([ruimarinho](https://github.com/ruimarinho)) - Remove jscs inline camel case rules [\#65](https://github.com/uphold/validator.js-asserts/pull/65) ([nunofgs](https://github.com/nunofgs)) ## [v2.0.1](https://github.com/uphold/validator.js-asserts/tree/v2.0.1) (2016-01-26) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v2.0.0...v2.0.1) **Fixed bugs:** - Fix abavalidator not being considered optional [\#63](https://github.com/uphold/validator.js-asserts/pull/63) ([ruimarinho](https://github.com/ruimarinho)) **Merged pull requests:** - Add module exports [\#64](https://github.com/uphold/validator.js-asserts/pull/64) ([ruimarinho](https://github.com/ruimarinho)) ## [v2.0.0](https://github.com/uphold/validator.js-asserts/tree/v2.0.0) (2016-01-21) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v1.1.0...v2.0.0) **Implemented enhancements:** - Code style improvements [\#62](https://github.com/uphold/validator.js-asserts/pull/62) ([ruimarinho](https://github.com/ruimarinho)) - Add missing Phone assert test for valid phone [\#61](https://github.com/uphold/validator.js-asserts/pull/61) ([ruimarinho](https://github.com/ruimarinho)) - Beautify README [\#59](https://github.com/uphold/validator.js-asserts/pull/59) ([ruimarinho](https://github.com/ruimarinho)) - Add support for the special `is` urijs constraint [\#58](https://github.com/uphold/validator.js-asserts/pull/58) ([ruimarinho](https://github.com/ruimarinho)) - Add US Zip Code assert [\#54](https://github.com/uphold/validator.js-asserts/pull/54) ([promag](https://github.com/promag)) - Add Phone assert [\#53](https://github.com/uphold/validator.js-asserts/pull/53) ([promag](https://github.com/promag)) - Add ABA Routing Number assert [\#52](https://github.com/uphold/validator.js-asserts/pull/52) ([promag](https://github.com/promag)) - Handle empty objects in `EqualKeys` [\#50](https://github.com/uphold/validator.js-asserts/pull/50) ([ruimarinho](https://github.com/ruimarinho)) - Drop support for node \< 4 [\#49](https://github.com/uphold/validator.js-asserts/pull/49) ([ruimarinho](https://github.com/ruimarinho)) - Reimplement `UsState` as `UsSubdivision` [\#22](https://github.com/uphold/validator.js-asserts/pull/22) ([promag](https://github.com/promag)) **Fixed bugs:** - Fix asserts always requiring peer dependencies [\#31](https://github.com/uphold/validator.js-asserts/issues/31) - Fix peer dependencies being required directly [\#35](https://github.com/uphold/validator.js-asserts/pull/35) ([nunofgs](https://github.com/nunofgs)) **Closed issues:** - Add AcceptKeys assert [\#43](https://github.com/uphold/validator.js-asserts/issues/43) **Merged pull requests:** - Deprecate Country assert [\#60](https://github.com/uphold/validator.js-asserts/pull/60) ([ruimarinho](https://github.com/ruimarinho)) - Update lodash to version 4.0.0 🚀 [\#57](https://github.com/uphold/validator.js-asserts/pull/57) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) - Update should to version 8.1.1 🚀 [\#56](https://github.com/uphold/validator.js-asserts/pull/56) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) - iban@0.0.6 breaks build 🚨 [\#39](https://github.com/uphold/validator.js-asserts/pull/39) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) ## [v1.1.0](https://github.com/uphold/validator.js-asserts/tree/v1.1.0) (2015-10-16) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v1.0.0...v1.1.0) **Merged pull requests:** - Update all dependencies 🌴 [\#27](https://github.com/uphold/validator.js-asserts/pull/27) ([greenkeeperio-bot](https://github.com/greenkeeperio-bot)) - Add Bank Identifier Code assert [\#24](https://github.com/uphold/validator.js-asserts/pull/24) ([nunofgs](https://github.com/nunofgs)) - Add International Bank Account Number assert [\#23](https://github.com/uphold/validator.js-asserts/pull/23) ([nunofgs](https://github.com/nunofgs)) ## [v1.0.0](https://github.com/uphold/validator.js-asserts/tree/v1.0.0) (2015-08-11) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v0.0.7...v1.0.0) **Merged pull requests:** - Refactor using ES6 [\#20](https://github.com/uphold/validator.js-asserts/pull/20) ([ruimarinho](https://github.com/ruimarinho)) - Move dependencies to peer dependencies [\#19](https://github.com/uphold/validator.js-asserts/pull/19) ([ruimarinho](https://github.com/ruimarinho)) ## [v0.0.7](https://github.com/uphold/validator.js-asserts/tree/v0.0.7) (2015-05-25) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v0.0.6...v0.0.7) **Merged pull requests:** - Add null or date assert [\#17](https://github.com/uphold/validator.js-asserts/pull/17) ([nunofgs](https://github.com/nunofgs)) ## [v0.0.6](https://github.com/uphold/validator.js-asserts/tree/v0.0.6) (2015-05-25) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v0.0.5...v0.0.6) **Merged pull requests:** - Export object for validator.js extend method usage [\#16](https://github.com/uphold/validator.js-asserts/pull/16) ([ruimarinho](https://github.com/ruimarinho)) - Add documentation for uri assert [\#15](https://github.com/uphold/validator.js-asserts/pull/15) ([ruimarinho](https://github.com/ruimarinho)) ## [v0.0.5](https://github.com/uphold/validator.js-asserts/tree/v0.0.5) (2015-05-24) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v0.0.4...v0.0.5) **Merged pull requests:** - Add missing comment to credit card test [\#26](https://github.com/uphold/validator.js-asserts/pull/26) ([nunofgs](https://github.com/nunofgs)) - Use travis container infrastructure [\#14](https://github.com/uphold/validator.js-asserts/pull/14) ([ruimarinho](https://github.com/ruimarinho)) - Replace ISO 3166-1 country assert source [\#13](https://github.com/uphold/validator.js-asserts/pull/13) ([ruimarinho](https://github.com/ruimarinho)) - Add URI assert [\#12](https://github.com/uphold/validator.js-asserts/pull/12) ([nunofgs](https://github.com/nunofgs)) ## [v0.0.4](https://github.com/uphold/validator.js-asserts/tree/v0.0.4) (2015-01-16) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v0.0.3...v0.0.4) **Merged pull requests:** - Update bignumber.js version [\#7](https://github.com/uphold/validator.js-asserts/pull/7) ([fixe](https://github.com/fixe)) ## [v0.0.3](https://github.com/uphold/validator.js-asserts/tree/v0.0.3) (2014-12-01) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v0.0.2...v0.0.3) **Merged pull requests:** - Update asserts documentation [\#6](https://github.com/uphold/validator.js-asserts/pull/6) ([ruimarinho](https://github.com/ruimarinho)) - Update github-changes@0.0.16 [\#5](https://github.com/uphold/validator.js-asserts/pull/5) ([ruimarinho](https://github.com/ruimarinho)) - Remove extra console message from email test [\#4](https://github.com/uphold/validator.js-asserts/pull/4) ([ruimarinho](https://github.com/ruimarinho)) - Add date diff less and greater than asserts [\#3](https://github.com/uphold/validator.js-asserts/pull/3) ([ruimarinho](https://github.com/ruimarinho)) ## [v0.0.2](https://github.com/uphold/validator.js-asserts/tree/v0.0.2) (2014-11-26) [Full Changelog](https://github.com/uphold/validator.js-asserts/compare/v0.0.1...v0.0.2) **Merged pull requests:** - Expose min and max in `NullOrString` [\#2](https://github.com/uphold/validator.js-asserts/pull/2) ([fixe](https://github.com/fixe)) - Add `Email` assert [\#1](https://github.com/uphold/validator.js-asserts/pull/1) ([fixe](https://github.com/fixe))