ngx-iban-validator 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/README.md +14 -23
- package/dist/README.md +14 -23
- package/dist/code-lengths.js +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to the **NGX IBAN Validator** project will be documented in
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.2.4] - 2026-04-12
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **Algeria**: (DZ) length 26 -> 24
|
|
13
|
+
|
|
14
|
+
### Updated
|
|
15
|
+
|
|
16
|
+
- **Docs**: Updated Angular example in README to use the new @if syntax.
|
|
17
|
+
- **Demo apps - Angular**: Updated to Angular 20.3.18
|
|
18
|
+
|
|
8
19
|
## [1.2.3] - 2024-06-08
|
|
9
20
|
|
|
10
21
|
- Switch to pnpm as default package manager, setup monorepo structure, added demo apps and docs to repo
|
package/README.md
CHANGED
|
@@ -107,7 +107,6 @@ Import validateIBAN function from ngx-iban-validator package into your component
|
|
|
107
107
|
|
|
108
108
|
```ts
|
|
109
109
|
import { Component, inject } from '@angular/core';
|
|
110
|
-
import { NgIf } from '@angular/common';
|
|
111
110
|
import {
|
|
112
111
|
FormBuilder,
|
|
113
112
|
FormGroup,
|
|
@@ -120,7 +119,7 @@ import { validateIBAN } from 'ngx-iban-validator';
|
|
|
120
119
|
@Component({
|
|
121
120
|
selector: 'my-app',
|
|
122
121
|
standalone: true,
|
|
123
|
-
imports: [
|
|
122
|
+
imports: [ReactiveFormsModule],
|
|
124
123
|
template: `
|
|
125
124
|
<div class="page">
|
|
126
125
|
<form [formGroup]="ibanForm" (ngSubmit)="submit(ibanForm)">
|
|
@@ -130,27 +129,19 @@ import { validateIBAN } from 'ngx-iban-validator';
|
|
|
130
129
|
<button [disabled]="ibanForm.invalid">Submit</button>
|
|
131
130
|
</div>
|
|
132
131
|
<div class="validation-errors">
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
IBAN Code length is invalid
|
|
147
|
-
</span>
|
|
148
|
-
<span
|
|
149
|
-
*ngIf="ibanForm.get('iban')?.errors?.['error']['patternInvalid']"
|
|
150
|
-
>
|
|
151
|
-
IBAN Code pattern is invalid
|
|
152
|
-
</span>
|
|
153
|
-
</small>
|
|
132
|
+
@if (ibanForm.get('iban')?.errors?.['ibanInvalid']) {
|
|
133
|
+
<small>
|
|
134
|
+
@if (ibanForm.get('iban')?.errors?.['error']['countryUnsupported']) {
|
|
135
|
+
<span>Country not supported</span>
|
|
136
|
+
}
|
|
137
|
+
@if (ibanForm.get('iban')?.errors?.['error']['codeLengthInvalid']) {
|
|
138
|
+
<span>IBAN Code length is invalid</span>
|
|
139
|
+
}
|
|
140
|
+
@if (ibanForm.get('iban')?.errors?.['error']['patternInvalid']) {
|
|
141
|
+
<span>IBAN Code pattern is invalid</span>
|
|
142
|
+
}
|
|
143
|
+
</small>
|
|
144
|
+
}
|
|
154
145
|
</div>
|
|
155
146
|
</form>
|
|
156
147
|
</div>
|
package/dist/README.md
CHANGED
|
@@ -107,7 +107,6 @@ Import validateIBAN function from ngx-iban-validator package into your component
|
|
|
107
107
|
|
|
108
108
|
```ts
|
|
109
109
|
import { Component, inject } from '@angular/core';
|
|
110
|
-
import { NgIf } from '@angular/common';
|
|
111
110
|
import {
|
|
112
111
|
FormBuilder,
|
|
113
112
|
FormGroup,
|
|
@@ -120,7 +119,7 @@ import { validateIBAN } from 'ngx-iban-validator';
|
|
|
120
119
|
@Component({
|
|
121
120
|
selector: 'my-app',
|
|
122
121
|
standalone: true,
|
|
123
|
-
imports: [
|
|
122
|
+
imports: [ReactiveFormsModule],
|
|
124
123
|
template: `
|
|
125
124
|
<div class="page">
|
|
126
125
|
<form [formGroup]="ibanForm" (ngSubmit)="submit(ibanForm)">
|
|
@@ -130,27 +129,19 @@ import { validateIBAN } from 'ngx-iban-validator';
|
|
|
130
129
|
<button [disabled]="ibanForm.invalid">Submit</button>
|
|
131
130
|
</div>
|
|
132
131
|
<div class="validation-errors">
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
IBAN Code length is invalid
|
|
147
|
-
</span>
|
|
148
|
-
<span
|
|
149
|
-
*ngIf="ibanForm.get('iban')?.errors?.['error']['patternInvalid']"
|
|
150
|
-
>
|
|
151
|
-
IBAN Code pattern is invalid
|
|
152
|
-
</span>
|
|
153
|
-
</small>
|
|
132
|
+
@if (ibanForm.get('iban')?.errors?.['ibanInvalid']) {
|
|
133
|
+
<small>
|
|
134
|
+
@if (ibanForm.get('iban')?.errors?.['error']['countryUnsupported']) {
|
|
135
|
+
<span>Country not supported</span>
|
|
136
|
+
}
|
|
137
|
+
@if (ibanForm.get('iban')?.errors?.['error']['codeLengthInvalid']) {
|
|
138
|
+
<span>IBAN Code length is invalid</span>
|
|
139
|
+
}
|
|
140
|
+
@if (ibanForm.get('iban')?.errors?.['error']['patternInvalid']) {
|
|
141
|
+
<span>IBAN Code pattern is invalid</span>
|
|
142
|
+
}
|
|
143
|
+
</small>
|
|
144
|
+
}
|
|
154
145
|
</div>
|
|
155
146
|
</form>
|
|
156
147
|
</div>
|
package/dist/code-lengths.js
CHANGED
|
@@ -24,10 +24,10 @@ export const CODE_LENGTHS = {
|
|
|
24
24
|
CY: 28,
|
|
25
25
|
CZ: 24,
|
|
26
26
|
DE: 22,
|
|
27
|
-
DK: 18,
|
|
28
27
|
DJ: 27,
|
|
28
|
+
DK: 18,
|
|
29
29
|
DO: 28,
|
|
30
|
-
DZ:
|
|
30
|
+
DZ: 24,
|
|
31
31
|
EE: 20,
|
|
32
32
|
EG: 29,
|
|
33
33
|
ES: 24,
|
|
@@ -40,8 +40,8 @@ export const CODE_LENGTHS = {
|
|
|
40
40
|
GE: 22,
|
|
41
41
|
GI: 23,
|
|
42
42
|
GL: 18,
|
|
43
|
-
GR: 27,
|
|
44
43
|
GQ: 27,
|
|
44
|
+
GR: 27,
|
|
45
45
|
GT: 28,
|
|
46
46
|
GW: 25,
|
|
47
47
|
HN: 28,
|
|
@@ -49,8 +49,8 @@ export const CODE_LENGTHS = {
|
|
|
49
49
|
HU: 28,
|
|
50
50
|
IE: 22,
|
|
51
51
|
IL: 23,
|
|
52
|
-
IR: 26,
|
|
53
52
|
IQ: 23,
|
|
53
|
+
IR: 26,
|
|
54
54
|
IS: 26,
|
|
55
55
|
IT: 27,
|
|
56
56
|
JO: 30,
|
|
@@ -87,8 +87,8 @@ export const CODE_LENGTHS = {
|
|
|
87
87
|
PT: 25,
|
|
88
88
|
QA: 29,
|
|
89
89
|
RO: 24,
|
|
90
|
-
RU: 33,
|
|
91
90
|
RS: 22,
|
|
91
|
+
RU: 33,
|
|
92
92
|
SA: 24,
|
|
93
93
|
SC: 31,
|
|
94
94
|
SD: 18,
|