public function PhoneFieldValidationRuleTest::phoneNumbersProviderValid in Field Validation 8
Data provider for valid phone numbers.
File
- tests/
src/ Kernel/ Plugin/ FieldValidationRule/ PhoneFieldValidationRuleTest.php, line 168
Class
- PhoneFieldValidationRuleTest
- Tests PhoneFieldValidationRule.
Namespace
Drupal\Tests\field_validation\Kernel\Plugin\FieldValidationRuleCode
public function phoneNumbersProviderValid() {
return [
'Fr-1' => [
'fr',
'+33495035197',
],
'Fr-2' => [
'fr',
'0751934400',
],
'Fr-3' => [
'fr',
'+330901260122',
],
'Be-1' => [
'be',
'069346426',
],
'Be-2' => [
'be',
'+3225541437',
],
'It-1' => [
'it',
'+39368775417',
],
'El/Gr-1' => [
'el',
'+302589166966',
],
'El/Gr-2' => [
'el',
'+30 2589166966',
],
'El/Gr-3' => [
'el',
'+30 258 9166966',
],
'El/Gr-4' => [
'el',
'+30 2589 166966',
],
'El/Gr-5' => [
'el',
'6949707903',
],
'El/Gr-6' => [
'el',
'694 9707903',
],
'El/Gr-7' => [
'el',
'6949 707903',
],
'Ch-1' => [
'ch',
'+41366802896',
],
'Ch-2' => [
'ch',
'+410366802896',
],
'Ch-3' => [
'ch',
'0041366802896',
],
'Us/Ca-1' => [
'ca',
'16048924417',
],
'Us/Ca-2' => [
'ca',
'(890)659-63885608',
],
'Us/Ca-3' => [
'ca',
'+1-604-892-4417',
],
'Cr-1' => [
'cr',
'00-61-13-31-23',
],
'Cr-2' => [
'cr',
'0061133123',
],
'Cr-3' => [
'cr',
'61133123',
],
'Pa-1' => [
'pa',
'+666 132 1234',
],
'Pa-2' => [
'pa',
'00666 132 1234',
],
'Ru-1' => [
'ru',
'+7-1234-123-12',
],
'Ru-2' => [
'ru',
'+8 1234 123 12',
],
'Es-1' => [
'es',
'090-1223564',
],
'Es-2' => [
'es',
'090-122356',
],
'Cz-1' => [
'cs',
'00420 123 123 123',
],
'Cz-2' => [
'cs',
'+420 123 123 123',
],
'Cz-3' => [
'cs',
'00420123123123',
],
'Cz-4' => [
'cs',
'+420123123123',
],
'Pl-mobile-1' => [
'hu',
'+06123123123',
],
'Pl-mobile-2' => [
'hu',
'+36123123123',
],
'Pl-1' => [
'pl',
'+48 123-123-123',
],
'Pl-2' => [
'pl',
'+48 123 123 123',
],
'Pl-3' => [
'pl',
'+48 123123123',
],
'Nl-1' => [
'nl',
'06-59989008',
],
'Se-1' => [
'se',
'+46 55 12 12 12',
],
'Se-2' => [
'se',
'+46 55 123 123 12',
],
'Za-1' => [
'za',
'+27 12 123 1234',
],
'Za-2' => [
'za',
'+27121231234',
],
'Za-3' => [
'za',
'27121231234',
],
'Br-1' => [
'br',
'+55 012 100 1234',
],
'Br-2' => [
'br',
'+5501210001234',
],
'Br-3' => [
'br',
'+55-012-1000-1234',
],
'Cn-1' => [
'cn',
'+86 12345678911',
],
'Cn-2' => [
'cn',
'86 123 45678911',
],
'Ph-1' => [
'ph',
'+63 2835556870',
],
'Sg-1' => [
'sg',
'+65 61234567',
],
'Sg-2' => [
'sg',
'+6581234567',
],
'Sg-3' => [
'sg',
'+65 91234567',
],
'Jo-1' => [
'jo',
'+962-781234567',
],
'Jo-2' => [
'jo',
'962-781234567',
],
'Jo-3' => [
'jo',
'0-781234567',
],
'Pk-1' => [
'pk',
'+92-(01234)-1234',
],
'In-1' => [
'in',
'+091123456789',
],
];
}