@relliv/tc-no-utils
v1.0.3
Published
Simple TC No utilities for form input validation and testing.
Downloads
9
Maintainers
Readme
tc-no-utils
This project contains simple utilities for form input validation and testing.
[!WARNING] These utilities do not provide UI components or KPS (NVI validation API) validation.
Play on StackBlitz ⚡️
📦 Installation
#PNPM
pnpm i @relliv/tc-no-utils
or
NPM
npm i @relliv/tc-no-utils
🚀 Usage
Generate
import { TcNoGenerate } from "@relliv/tc-no-utils"
const tcNo = TcNoGenerate.generate()
Validate
import { TcNoValidate } from "@relliv/tc-no-utils"
const tcNo = "11111111111",
result = TcNoValidate.validate(tcNo)
if (result.isValid) {
console.log("TC No is valid")
} else {
console.log(result.message)
}