0.0.1-test • Published 1 year ago

@sophat/check-validation v0.0.1-test

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

checking-validation

npm: @sophat/check-validation

The @sophat/check-validation checking validation. Purpose to be used in the frontend.

⬇️ Installation

npm install @sophat/check-validation --dev

📂 Usage

⚡ Import

import { Validate } from "@sophat/check-validation";

📞 Checking Phone

Validate.phone("010 125 6783") // true
Validate.phone("+855 10 125 6783") // true

Validate.phone("010 125 67832") // false
Validate.phone("+855 10 125 67832") // false

📧 Check Email

Validate.email("info@pphat.me") // true
Validate.email("info@pphat.xyz") // true
Validate.email("-info@pphat.xyz") // false

🔐 Check Password

Validate.password("@Ashsdl93") // true
Validate.password("123abc") // false

⭕ Check Is Empty

Ignoring Spacing and null able

Validate.isEmpty("string") // false
Validate.isEmpty("") // true
Validate.isEmpty("    ") // true
Validate.isEmpty() // true

🔢 Check Is Number

Validate.isNumber("123") // true
Validate.isNumber(0.123) // true
Validate.isNumber("abcdef") // false

🪲 Bugs

Bug Report

0.0.1-test

1 year ago

0.0.1-beta

1 year ago

0.0.1

1 year ago