Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When optional fields having "alphanumeric" type in an ACH file are left empty, nACHError is thrown with "Invalid data type" message #4

Open
insertQuirkyNameHere opened this issue Mar 29, 2023 · 1 comment

Comments

@insertQuirkyNameHere
Copy link

For example, if the 'Reference Code' field in the File Header is left empty, a nACHError is thrown even though the file is in the correct format.
The issue seems to be with alphanumericRegex specified in lib.validate.js. It does not recognize empty strings

@insertQuirkyNameHere
Copy link
Author

insertQuirkyNameHere commented Mar 29, 2023

I overcame it by changing the regex to alphanumericRegex = /(^[0-9a-zA-Z!"#$%&'()*+,-.\/:;<>=?@\[\]\\^_`{}|~ ]+$)|(^$)/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant