lesca-validate
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i lesca-validate

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

23.4 kB

Total Files

31

Last publish

Collaborators

  • jameshsu1125