Skip to content

makinacorpus/iban-bundle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

composer require makinacorpus/iban-bundle

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

twig:
    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.

About

International Bank Account Number form type for Symfony

Resources

Stars

Watchers

Forks

Packages

No packages published