New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

client-side-validator

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

client-side-validator

Simple Inline validator or utility library for making developer life easier

latest
npmnpm
Version
0.1.8
Version published
Maintainers
1
Created
Source

Client-Side-Validator Build Status

A small library for validation stuff.

Feature:

  • Domain Validation
  • Email Validation
  • Text Validation
  • Phone Number Validation
  • 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

Keywords

Validator

FAQs

Package last updated on 13 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts