jarden-digital / nz-bank-account-validator

A validator for New Zealand bank accounts
MIT License
24 stars 3 forks source link

Validating bank number 04 #2

Open tybw opened 1 year ago

tybw commented 1 year ago

Hi,

This is not an issue but a question instead.

According to both the older and the latest version of the IRD document, I found there is no 'See note' remark in the algorithm column for bank number 04: https://www.ird.govt.nz/-/media/project/ir/home/documents/income-tax/withholding-taxes/rwt-nrwt-withholding-tax-certificate/2020-rwt-and-nrwt-certificate-filing-specification.pdf.

I wonder which is the most appropriate algorithm to use. May be no validation is needed for the account number part as if algorithm X?

Thanks.

Terence

Aniaklc commented 1 year ago

Hi , Iam also struggling to validate the nz bank account number using regex especially at suffix . Would like to write a regex validator to add leading zero to suffix without any dashes for the account number and suffix . Please help . Cheers

tybw commented 1 year ago

I am going to answer my question. I found the latest documentation on it (thanks IRD's Account Manager): https://www.ird.govt.nz/-/media/project/ir/home/documents/digital-service-providers/software-providers/payroll-calculations-business-rules-specifications/payroll-calculations-and-business-rules-specification-2024-v1-1.pdf?modified=20230208203603&modified=20230208203603

On page 89, it states that for bank 04, algorithm A or B should be used.

@Aniaklc I am not sure using regex is the easiest way. This validator should be enough.

Aniaklc commented 1 year ago

regex is the only choice we have.docx

Hi thanks so much for your reply, the issue is we cannot use any other logic apart from regex in SAP Success factors ON boarding tool as attached, so struggling with the tool itself:)... anyway thanks so much.

toddb commented 10 months ago

Just a slightly off topic comment for people searching. Wise looks to have an arrangement with ANZ (04) to offer bank accounts.