/form-validator

Lightweight library for HTML form fields validation

Primary LanguageTypeScript

Validator

Description

A tool for easily validate a value based on specific schemas

Installation

npm i @asaje/form-validator

or

yarn add @asaje/form-validator

How to use

import { Validator } from '@asaje/form-validator';

const result = Validator.validate('hello', [
  Validator.required(),
  Validator.alpha(),
  Validator.minLength(5),
  Validator.maxLength(12),
]);