0.1.8 • Published 6 years ago

client-side-validator v0.1.8

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

Client-Side-Validator Build Status

A small library for validation stuff.

Feature:

  1. Domain Validation
  2. Email Validation
  3. Text Validation
  4. Phone Number Validation
  5. Number Validation

Installation

npm install client-side-validator or yarn add client-side-validator

Usage

ES5

var clientSideValidator = require("client-side-validator");

var FIELDS=clientSideValidator.FIELDS;
var validator=clientSideValidator.validator;
var fieldValues= [{ key: 'sender', type: FIELDS.PHONENUMBER, value:'98' },{ key: 'email', type: FIELDS.EMAIL, value:'medineshkatwal@gmail.com' }]
var response = validator(fieldValues);
console.log(response)

ES6

import { validator, FIELDS } from 'client-side-validator';

const fieldValues= [{ key: 'sender', type: FIELDS.PHONENUMBER, value:'98' },{ key: 'email', type: FIELDS.EMAIL, value:'medineshkatwal@gmail.com' }]
const response = validator(fieldValues);
console.log(response)

Tests

npm test

Contributing

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago