@validarium/predicates

Reusable predicates used within @validarium/intl.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
@validarium/predicates
29230.7.23 years ago4 years agoMinified + gzip package size for @validarium/predicates in KB

Readme

Predicates

<img alt="Validarium" src="https://validarium.js.org/_media/logo.png" width="300" />



šŸ–ļø šŸ›” šŸš€


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!


See our documentation site.


<img src="https://flat.badgen.net/badge/-/github?icon=github&label" alt="Github" />

MIT License
<img src="https://img.shields.io/travis/lundegaard/validarium/master.svg?style=flat-square" alt="Travis" />

<img src="https://img.shields.io/npm/dm/@validarium/core.svg" alt="Downloads" />

<img src="https://flat.badgen.net/npm/v/validarium" alt="Version" />


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.
* [.hasDateMax](#module_predicates.hasDateMax)
* [.hasDateMin](#module_predicates.hasDateMin)
* [.hasLength](#module_predicates.hasLength)
* [.hasLengthMax](#module_predicates.hasLengthMax)
* [.hasLengthMin](#module_predicates.hasLengthMin)
* [.hasNoSpecialSymbols](#module_predicates.hasNoSpecialSymbols)
* [.hasNoWhiteSpace](#module_predicates.hasNoWhiteSpace)
* [.hasOnlyDigits](#module_predicates.hasOnlyDigits)
* [.hasValueInInterval](#module_predicates.hasValueInInterval)
* [.hasValueMax](#module_predicates.hasValueMax)
* [.hasValueMin](#module_predicates.hasValueMin)
* [.isDivisibleBy](#module_predicates.isDivisibleBy)
* [.isEmail](#module_predicates.isEmail)
* [.isInteger](#module_predicates.isInteger)
* [.isNegativeNumber](#module_predicates.isNegativeNumber)
* [.isNumber](#module_predicates.isNumber)
* [.isOneOf](#module_predicates.isOneOf)
* [.isPhoneNumber](#module_predicates.isPhoneNumber)
* [.isPositiveNumber](#module_predicates.isPositiveNumber)
* [.isRequired](#module_predicates.isRequired)
* [.isString](#module_predicates.isString)
* [.isTrimmedLeft](#module_predicates.isTrimmedLeft)
* [.isTrimmedRight](#module_predicates.isTrimmedRight)
* [.isValidIban](#module_predicates.isValidIban)
* [.isRequiredNumber](#module_predicates.isRequiredNumber)
* [.isTrimmed](#module_predicates.isTrimmed)
* [.hasAgeInInterval()](#module_predicates.hasAgeInInterval)
* [.hasLengthInterval()](#module_predicates.hasLengthInterval)
* [.isNotOneOf()](#module_predicates.isNotOneOf)
* [.matches()](#module_predicates.matches)
* [.startsWith()](#module_predicates.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.