makinacorpus / iban-bundle
International Bank Account Number form type
Installs: 12 409
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 14
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- symfony/framework-bundle: ~2.3|~3.0
Requires (Dev)
- phpunit/phpunit: ^5.0
README
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.