zip-code-validator icon indicating copy to clipboard operation
zip-code-validator copied to clipboard

Get ISO from other formType

Open LauLaman opened this issue 4 years ago • 2 comments

I would like to create a multi-county form where the user selects the country.

The iso should be used set by another form type so that when i am selecting Belgium it validates and when i select The Netherlands it also validates

Symfony has the CountryType already build in.

It would be nice to use it like this:

/**
 * @ZipCode(iso="AUTO")
 */

In this case we look in the form for the CountryType and use its value

LauLaman avatar Sep 30 '21 14:09 LauLaman

Hi, did you already check the docs?

https://github.com/barbieswimcrew/zip-code-validator#use-a-getter-to-inject-the-country-code-dynamically

Maybe this will help you? Let me know.

Am 30.09.2021 um 16:56 schrieb Laurens Laman @.***>:

 I would like to create a multi-county form where the user selects the country.

The iso should be used set by another form type so that when i am selecting Belgium it validates and when i select The Netherlands it also validates

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.

barbieswimcrew avatar Oct 01 '21 05:10 barbieswimcrew

@LauLaman did that solve your issue? Let me know, thanks!

barbieswimcrew avatar Oct 06 '21 10:10 barbieswimcrew