1.2.2 • Published 3 years ago

js-input-field-validator v1.2.2

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

JS-Input-Field-Validator

Installation

$ npm i js-input-field-validator

Usage

const jsInputFieldValidator = require("js-input-field-validator");

const error = jsInputFieldValidator([
  { value: "Alex", type: "text", min: 4, max: 8, field: "name" },
  { value: 123, type: "number", min: 3, max: 5, field: "number" },
  { value: "testing testing", type: "any", field: "note" },
  { value: "alex@gmail.com", type: "email", field: "email" }
]);

if (error) {
  console.log(error);
} else {
  // Take your prefared action if the validation process passes.
  console.log("Validation process passed");
}

Link

https://www.npmjs.com/package/js-input-field-validator

1.2.2

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago