Skip to content

Typescript package of validators and regexp patterns

License

Notifications You must be signed in to change notification settings

Luukkasz/validators

This branch is 10 commits behind Currency-One/validators:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Marek Mizier
Sep 22, 2023
9a5e1f3 · Sep 22, 2023
Feb 3, 2021
Jan 2, 2020
Sep 22, 2023
Sep 22, 2023
Jun 11, 2021
Jul 31, 2020
Jul 31, 2020
May 19, 2021
Jan 2, 2020
Jan 7, 2020
Jan 2, 2020
Sep 22, 2023
Sep 22, 2023
Jul 31, 2020
Jan 2, 2020

Repository files navigation

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

About

Typescript package of validators and regexp patterns

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%