npm.io
2.0.1 • Published 10 months ago

lesca-validate

Licence
—
Version
2.0.1
Deps
0
Size
7 kB
Vulns
0
Weekly
0

React React React React React NPM React NPM

Why use it?

check is validate email, phone number and url format.

Live Demo

Installation

npm install lesca-validate --save

Usage

As a Node module:

import {
  ValidateEmail,
  ValidatePhone,
  ValidateURL,
  ValidateYoutubeURL,
  ValiDateInvoice,
} from 'lesca-validate';

const email = 'username@host.com';
ValidateEmail(email); // true

const phone = '0912345678';
ValidatePhone(phone); // true

const url = 'https://google.com';
ValidatePhone(url); // true

const youtubeURL = 'https://www.youtube.com/watch?v=09839DpTctU';
ValidateYoutubeURL(youtubeURL); // '09839DpTctU';

const invoiceNumber = 'XS12345678';
ValiDateInvoice(invoiceNumber); // 'true';

Features

  • maintain if necessary

Keywords