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

IBAN valid exact match (no spaces, hyphens) #20

Open
mkczyk opened this issue Mar 6, 2023 · 3 comments
Open

IBAN valid exact match (no spaces, hyphens) #20

mkczyk opened this issue Mar 6, 2023 · 3 comments
Assignees

Comments

@mkczyk
Copy link

mkczyk commented Mar 6, 2023

IBAN with spaces is valid:

   DE02120300000000202051   

with hyphens also valid:

DE02120300000000202051---

with random spaces and hyphens also valid:

- - -DE02--1-20300- 00000--0202  051 - 

I think there should be exact match checking (no trim, clean etc.).

I guess this is related to possible formatting with ibanFormatter. But maybe only specified formatting should be allowed? Or add optional parameter to ValidatorService.validateIban which should valid with ignoring spaces and hyphens or without.

@kimljj kimljj self-assigned this Mar 8, 2023
@kimljj
Copy link
Collaborator

kimljj commented Mar 8, 2023

Hi @mkczyk,

thanks for opening this issue and your suggestion for this library.

angular-iban is a wrapper of the library iban.js for Angular. If you check the source code of angular-iban, you will see the usage of it.

For me, this formatting is a nice feature. So far we didn't get any objections on it. But of couse, if we really want to change or improve it, we could open an issue at iban.js.

Sounds it good to you? 😉

Have a nice day!
Jinjin

@mkczyk
Copy link
Author

mkczyk commented Mar 8, 2023

Thanks for clarification. You are right that library iban.js is responsible for that.

That formatting is nice, but validation with random characters not very much. I found corresponding issue in iban.js project: arhs/iban.js#35. There was the same case but discussion stopped some years ago.

I found also that iban.js project is abandoned: arhs/iban.js#88. Probably because of it, this issue isn't fixed. They recommend to switch to library ibantools (I tested this and above example with IBAN works as expected.).

Do you have any info about roadmap for angular-iban regarding abandoned iban.js? Switching to ibantools (but how it corresponds to other Angular libraries that use iban tools like ngx-iban)? Abandoning this project too?

@kimljj
Copy link
Collaborator

kimljj commented Mar 8, 2023

@mkczyk,
thanks for the deep lookup. I will have a look at ibantools. If it's excellent, I will start with the switching. 👍

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

2 participants