rvm-form-validator
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

RVM Form Validator

A library to simplify the form Validation process. We have support for custom regex patterns which gives it the ability to make it super compatible with any application you are trying to build.

The library uses TS so the functions and its parameters are well defined making the easy to understand and use in the projects. Using all the experience gained by developing multiple applications using forms we have put together this library to ease the process of validating a form for anyone.

The library does not contain and vulnerabilities deeming it safe for any type of application.

Installation

Install "rvm-form-validator" with npm

  npm install rvm-form-validator

Usage/Examples

import FormValidator from 'rvm-form-validator'

const validator = new FormValidator();

// To validate Text
const isTextValid = validator.validateString("test123",false,10,true);
console.log("Is text valid : ",isTextValid);

// To validate email
const isEmailValid = validator.validateEmail("test@hotmal.in",true);
console.log("Is email valid : ",isEmailValid)

// output object for all validations
// {isValid : boolean, message : string}

// use isValid to check if the value is valid and if it is false then look at message for the reason

Supported Validation

  • Text Validation
  • Number Validation
  • Phone Number Validation
  • Email Validation
  • Password Validation
  • Start Date Validation
  • End Date Validation
  • Start DateTIme Validation
  • End DateTime Validation
  • Website URL Validation
  • Drop Down Validation
  • CheckBox Validation
  • Radio Button Validation
  • File Upload Validation

Acknowledgements

Package Sidebar

Install

npm i rvm-form-validator

Weekly Downloads

0

Version

1.1.3

License

ISC

Unpacked Size

27.7 kB

Total Files

18

Last publish

Collaborators

  • saidarshanvr