Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@currency-one/validators

1.1.6 • Public • Published

Validators

npm version License

Typescript collection of validators and regexp patterns

Installation

To install run:

npm i @currency-one/validators

or

yarn add @currency-one/validators

Basic usage with React and build systems (webpack, parcel etc.):

import { isNotEmptyStringValidator, isAccountNumberPattern } from '@currency-one/validators'
 
export const notEmptyValidator = (value) => {
  return !isNotEmptyStringValidator(value) ? 'This field cant be empty' : ''
}
 
export const accountNumberPattern = (value) => {
  return !isAccountNumberPattern(value) ? 'This field can contain only: letters, numbers and space' : ''
}

Documentation

See documentation for more details

Install

npm i @currency-one/validators

DownloadsWeekly Downloads

94

Version

1.1.6

License

MIT

Unpacked Size

83.4 kB

Total Files

39

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar