Predicates
🖍️ 🛡 🚀
Validations done right.
Platform-agnostic validation library for JavaScript applications with extra focus on composable validations and message translations. Includes (pretty much) out-of-the-box support for both Redux Form and React Intl.
Create your validation schema based on priciples of functional programming.
Open Validarium in a RunKit sandbox!
This package contains all predicates used in validation functions. Name and usage is self explanatory. If not, please look at the tests.
You can use them for composing custom functionality.
API reference
predicates
This package contains all predicates used in validation functions. Name and usage is self explanatory. If not, please look at the tests.
You can use them for composing custom functionality.
-
predicates
- .hasDateMax
- .hasDateMin
- .hasLength
- .hasLengthMax
- .hasLengthMin
- .hasNoSpecialSymbols
- .hasNoWhiteSpace
- .hasOnlyDigits
- .hasValueInInterval
- .hasValueMax
- .hasValueMin
- .isDivisibleBy
- .isEmail
- .isInteger
- .isNegativeNumber
- .isNumber
- .isOneOf
- .isPhoneNumber
- .isPositiveNumber
- .isRequired
- .isString
- .isTrimmedLeft
- .isTrimmedRight
- .isValidIban
- .isRequiredNumber
- .isTrimmed
- .hasAgeInInterval()
- .hasLengthInterval()
- .isNotOneOf()
- .matches()
- .startsWith()
predicates.hasDateMax
predicates.hasDateMin
predicates.hasLength
predicates.hasLengthMax
predicates.hasLengthMin
predicates.hasNoSpecialSymbols
predicates.hasNoWhiteSpace
predicates.hasOnlyDigits
predicates.hasValueInInterval
predicates.hasValueMax
predicates.hasValueMin
predicates.isDivisibleBy
predicates.isEmail
predicates.isInteger
predicates.isNegativeNumber
predicates.isNumber
predicates.isOneOf
predicates.isPhoneNumber
predicates.isPositiveNumber
predicates.isRequired
predicates.isString
predicates.isTrimmedLeft
predicates.isTrimmedRight
predicates.isValidIban
predicates.isRequiredNumber
predicates.isTrimmed
predicates.hasAgeInInterval()
predicates.hasLengthInterval()
predicates.isNotOneOf()
predicates.matches()
predicates.startsWith()
Related projects
- @redux-tools – Maintaining large Redux applications with ease.
- react-union – Integrate React apps into various CMSs seamlessly.
- lundium – Beautiful React component library.
License
All packages are distributed under the MIT license. See the license here.