I have my countries and tax number fields, but so far I can't manage to differentiate if a country is from EU or not.
Here is my validation code (not working):
I was trying to get the countryCode from the countryField and with that make the query to the countries array and if it has a regex then pass the variable to the regex validation. But I have no idea how to do it.
So I have a world wide list of countries and I want to validate the VAT / Tax Number for countries from the EU.
Here is an example for the
countries array
:I have my
countries
andtax number
fields, but so far I can't manage to differentiate if a country is from EU or not. Here is my validation code (not working):I was trying to get the
countryCode
from thecountryField
and with that make the query to thecountries array
and if it has a regex then pass the variable to the regex validation. But I have no idea how to do it.Help Others Reproduce
I have nothing to run 🥲