Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
us-bank-account-validator
Advanced tools
Changelog
1.0.0
Update node to v18
Dev Dependency Updates
Readme
US Bank Account Validator provides validation utilities for US bank routing and account numbers. It includes first-class support for "potential" validity so you can use it to present appropriate UI to your user as they type.
You can install us-bank-account-validator through npm.
npm install us-bank-account-validator
In Node/Webpack/Browserify:
var valid = require("us-bank-account-validator");
var routingValidation = valid.routingNumber("4111");
if (routingValidation.isValid) {
renderFullyValidRoutingNumber();
} else if (!routingValidation.isPotentiallyValid) {
renderInvalidRoutingNumber();
}
In the browser with <script>
tags:
<script src="path/to/us-bank-account-validator.js"></script>
<script>
var accountValidation = valid.accountNumber("4111");
if (accountValidation.isValid) {
renderFullyValidAccountNumber();
} else if (!accountValidation.isPotentiallyValid) {
renderInvalidAccountNumber();
}
</script>
valid.routingNumber(value: string): object
Will return something like this:
{
// if false, indicates there is no way the number could be valid
isPotentiallyValid: true,
// if true, number is fully valid for submission
isValid: false
}
Valid routing numbers come from a hard-coded list of possible numbers, which you can find in src/routing-number-list.js
.
valid.accountNumber(value: string): object
Will return something like this:
{
// if false, indicates there is no way the number could be valid
isPotentiallyValid: true,
// if true, number is fully valid for submission
isValid: false
}
Valid account numbers are strings between 4 and 17 characters. They are usually numeric but not always, which is why this is a simple length check.
FAQs
A library for validating US Bank Account routing and account numbers
The npm package us-bank-account-validator receives a total of 4,669 weekly downloads. As such, us-bank-account-validator popularity was classified as popular.
We found that us-bank-account-validator demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.