yup-abn
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

yup-abn

CI

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 ❤️

Adam Zerella

Package Sidebar

Install

npm i yup-abn

Weekly Downloads

8

Version

1.1.0

License

MIT

Unpacked Size

4.59 kB

Total Files

7

Last publish

Collaborators

  • azerella