Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Validator] Some countries are missing #58126

Copy link
Copy link
Closed
@tugrul

Description

@tugrul
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.