yup-abn
v1.1.0
Published
Yup extension that validates ABN, ACN, ARBN or ARSN business identifiers for Australian business'
Downloads
12
Maintainers
Readme
yup-abn
Yup extension that validates ABN, ACN, ARBN or ARSN business identifiers for Australian business'.
Install
# NPM
npm i --save-dev yup-abn
# Yarn
yarn add -D yup-abn
Usage
Here's some example usage to get you started:
import * as Yup from 'yup';
import "yup-abn";
// ABN
const ABNSchmea = Yup.number().abn().required();
// ACN, ARBN or ARSN
const ACNSchmea = Yup.string().acn().required();
const ARBNSchmea = Yup.string().arbn().required();
const ARSNSchmea = Yup.string().arsn().required();
console.log(ABNSchmea.isValidSync(51824753556)); // → true
console.log(ACNSchmea.isValidSync('000000019')); // → true
Contributors
Don't be scared to raise an issue or a pull request!
Any contributions, no matter how big or small will land your picture here and be greatly appreciated ❤️