Socket
Socket
Sign inDemoInstall

@opuscapita/field-validators

Package Overview
Dependencies
Maintainers
0
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opuscapita/field-validators

Common library for master data field validations such as VAT ID, IBAN, etc.


Version published
Weekly downloads
71
decreased by-61.2%
Maintainers
0
Weekly downloads
 
Created
Source

field-validators

Common library for master data field validations such as VAT ID, IBAN, etc.

The library has the following validators:

  • International Bank Account Number (IBAN)
  • Bank Identifier Code (BIC)
  • Value Added Tax number (VAT)
  • Data Universal Numbering System number (DUNS)
  • Global Location Number (GLN)
  • Finnish Party Identification number (OVT-number) (OVT)
  • Company register number (REGNO)
  • ISR party number under Swiss IBAN (ISR)
  • ABA routing transit number (ABA)
  • Tax Identification Number
  • LeitwegID Number

To have a look at the full API, please visit the related wiki page.


Setup

Install library by running:

npm install @opuscapita/field-validators

Perform a validation by doing:

const validators = require('@opuscapita/field-validators');

// validate an IBAN
validators.IBAN.isValid('DE10000000000000000000');

// validate a VAT number
validators.VAT.isValid('DE 10000000');

// validate a BIC
validators.BIC.isValid('DEDSLTJXXXX');

// validate a DUNS number
validators.DUNS.isValid('356932675');

// validate a GLN
validators.GLN.isValid('3569326752346');

// validate an OVT
validators.OVT.isValid('003708599126');

// validate a REGNO
validators.REGNO.isValid('Jena GnR 100008', 'DE');

// validate an ISR
validators.ISR.isValid('54-354567-8');

// validate an ABA
validators.ABA.isValid('051000017');

// validate an LeitwegID
validators.LEITWEGID.isValid('04011000-1234512345-06');

Keywords

FAQs

Package last updated on 02 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc