17.4.0 • Published 4 months ago

ngx-iban v17.4.0

Weekly downloads
654
License
MIT
Repository
github
Last release
4 months ago

ngx-iban

This Angular (7+) library consists of three parts:

  1. a directive to use in forms;
  2. a pipe to transform a string to the IBAN format (groups of 4 characters);
  3. a validator to use in reactive forms;

An optional ISO 3166-1 alpha-2 country code can be passed as a parameter to both the directive and the validator. When given, validation also checks if the entered IBAN is valid for that specific country.

You can see a live demo of the module here.

Important note: From version 17.3.0 onward this library exports standalone components. This mitigates the need to import NgxIbanModule.

Installation

Just use your favorite package manager to install ngx-iban and ibantools.

Compatibility table

ngx-ibanAngular
7.x7.x
8.x8.x
9.x9.x
10.x10.x
11.x11.x
12.x12.x
13.x13.x
14.x14.x
15.x15.x
16.x16.x
17.x17.x

Usage

Directive

import { Component } from "@angular/core";
import { IbanDirective } from "ngx-iban";

@Component({
  imports: [IbanDirective],
  selector: "my-component",
  template: `
    <form>
      <input type="text" [(ngModel)]="iban" ngxIban>
      
      <!-- Or with an ISO 3166-1 alpha-2 country code -->
      <input type="text" [(ngModel)]="iban" ngxIban="NL">
      
      <!-- Or in a reactive form -->
      <input type="text" [formControl]="iban" ngxIban>
    </form>
  `
})
export class MyComponent {}

Pipe

<span>{{ 'GB82WEST12345698765432' | iban }}</span>

becomes

<span>GB82 WEST 1234 5698 7654 32</span>

Of course don't forget to import IbanPipe in your component.

Validator

import { ibanValidator } from "ngx-iban";

new FormControl("", ibanValidator());
17.4.0

4 months ago

17.3.0

6 months ago

17.1.0

6 months ago

17.2.0

6 months ago

17.0.2

6 months ago

17.0.1

6 months ago

17.0.0

6 months ago

16.0.0

12 months ago

15.0.0

1 year ago

15.0.1

1 year ago

14.0.0

2 years ago

13.0.0

3 years ago

9.3.0

3 years ago

10.2.0

3 years ago

7.3.0

3 years ago

12.0.0

3 years ago

12.1.0

3 years ago

8.3.0

3 years ago

11.2.0

3 years ago

9.2.1

3 years ago

10.1.1

3 years ago

7.2.1

3 years ago

8.2.1

3 years ago

11.1.1

3 years ago

10.1.0

3 years ago

7.2.0

3 years ago

8.2.0

3 years ago

9.2.0

3 years ago

11.1.0

3 years ago

11.0.0

3 years ago

10.0.0

4 years ago

10.0.1

4 years ago

8.1.0

4 years ago

9.1.0

4 years ago

7.1.0

4 years ago

8.0.0

4 years ago

7.0.0

4 years ago

9.0.0

4 years ago

3.2.0

4 years ago

3.1.0

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.3.0

6 years ago

2.2.0

6 years ago

2.1.0

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.0

6 years ago