Co-authored-by: Alex Ghiu <alex.ghiu@ing.com> Co-authored-by: Gerjan van Geest <Gerjan.van.Geest@ing.com> Co-authored-by: Thijs Louisse <Thijs.Louisse@ing.com> Co-authored-by: Joren Broekema <joren.broekema@ing.com> Co-authored-by: Erik Kroes <erik.kroes@ing.com>
20 lines
614 B
JavaScript
20 lines
614 B
JavaScript
import { LocalizeMixin } from '@lion/localize';
|
|
import { LionInput } from '@lion/input';
|
|
import { FieldCustomMixin } from '@lion/field';
|
|
import { formatIBAN } from './formatters.js';
|
|
import { parseIBAN } from './parsers.js';
|
|
import { IsIBAN } from './validators.js';
|
|
|
|
/**
|
|
* `LionInputIban` is a class for an IBAN custom form element (`<lion-input-iban>`).
|
|
*
|
|
* @extends {LionInput}
|
|
*/
|
|
export class LionInputIban extends FieldCustomMixin(LocalizeMixin(LionInput)) {
|
|
constructor() {
|
|
super();
|
|
this.formatter = formatIBAN;
|
|
this.parser = parseIBAN;
|
|
this.defaultValidators.push(new IsIBAN());
|
|
}
|
|
}
|