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

validator for IBAN #1297

Open
2 tasks done
jerome-laforge opened this issue Jul 25, 2024 · 5 comments
Open
2 tasks done

validator for IBAN #1297

jerome-laforge opened this issue Jul 25, 2024 · 5 comments

Comments

@jerome-laforge
Copy link

jerome-laforge commented Jul 25, 2024

  • I have looked at the documentation here first?
  • I have looked at the examples provided that may showcase my question here?

Package version eg. v9, v10:

v10

Issue, Question or Enhancement:

is it possible to add validator for IBAN?

@b-pagis
Copy link

b-pagis commented Jul 31, 2024

It is quite a hard task to have fully functional IBAN validator with country specific checks. Here is an old comment of mine explaining it why it would be so.

@jerome-laforge
Copy link
Author

make sens but can we just check:

  • minimal length
  • country is valid
  • validate checksum
  • and let BBAN part unchecked ?

@ccoVeille
Copy link

@ccoVeille
Copy link

ccoVeille commented Jul 31, 2024

please note, my point is not to implement the same thing or use one of this lib as a dependency.

It could be done, but then the maintenance might be a pain, especially for something as specific as IBAN

I'm more likely to suggest people who need IBAN validation to use one of the library I listed in a go-playground/validator custom validator

https://pkg.go.dev/github.com/go-playground/validator/v10#hdr-Custom_Validation_Functions

@nanderv
Copy link

nanderv commented Nov 21, 2024

please note, my point is not to implement the same thing or use one of this lib as a dependency.

It could be done, but then the maintenance might be a pain, especially for something as specific as IBAN

I'm more likely to suggest people who need IBAN validation to use one of the library I listed in a go-playground/validator custom validator

https://pkg.go.dev/github.com/go-playground/validator/v10#hdr-Custom_Validation_Functions

Fair answer, tho I would not really call IBAN particularly specific, since it's an EU-wide standard, and Social-Security-Numbers are also part of the spec.

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

4 participants