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
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
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).
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"
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.