makinacorpus/iban-bundle

Name: iban-bundle

Owner: Makina Corpus

Description: International Bank Account Number form type for Symfony

Created: 2016-10-25 15:41:29.0

Updated: 2017-11-29 13:05:09.0

Pushed: 2016-11-16 17:21:13.0

Homepage: null

Size: 5

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

International Bank Account Number form type for Symfony

Simply gives you a nice widget for IBAN numbers, please note that it's based on the default bootstrap form theme (any of the normal or horizontal one).

Installation

Install the package:

oser require makinacorpus/iban-bundle

Register the associated form theme in your app/config.yml file:

:
debug:            "%kernel.debug%"
strict_variables: false
form_themes:
    # ...
    - "IbanBundle:Form:fields.html.twig"

Usage

The widget has no options. Just add it to your form:

$this->createFormBuilder()
    ->add('iban', IbanType::class, [
        'label'       => "IBAN",
        'required'    => true,
        'constraints' => [
            new Assert\Iban(),
        ],
    ])

Please use the Symfony\Component\Validator\Constraints\Iban class for validation, it does respect the ISO 7064 standard.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.