@sophat/check-validation
v0.0.1-test
Published
The `@sophat/check-validation` checking validation. Purpose to be used in the frontend.
Downloads
9
Maintainers
Readme
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("[email protected]") // true
Validate.email("[email protected]") // true
Validate.email("[email protected]") // 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