Closed
Description
Symfony version(s) affected
6.4.10
Description
Some countries are not included and IbanValidator warns.
How to reproduce
Try to submit this iban MN140005005163847716
.
<?php
namespace App\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\Validator\Constraints as Assert;
class IbanValidatorFormType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
{
$builder
->add('iban', TextType::class, [
'label' => 'iban',
'constraints' => [
new Assert\Iban()
],
'attr' => [
'placeholder' => 'enter_your_iban_here'
]
])
->add('submit', SubmitType::class, [
'label' => 'validate'
])
;
}
}
Possible Solution
I see there is an update script Resources/bin/sync-iban-formats.php
. The list will possibly updated when the script executed.
Additional Context
No response