0.1.8 • Published 7 years ago

client-side-validator v0.1.8

Weekly downloads
-
License
ISC
Repository
-
Last release
7 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

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago