Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation Error when putting 'separateDialCode' to true #57

Open
ElectricFiras opened this issue Nov 13, 2018 · 5 comments
Open

Validation Error when putting 'separateDialCode' to true #57

ElectricFiras opened this issue Nov 13, 2018 · 5 comments

Comments

@ElectricFiras
Copy link

I'm using the PhoneInput widget with the "saperateDialCode" option set to true,
and I check the validation at submit, so when I submit it adds the dial code automatically to the input value and gives me a validation error "The format of Phone Number is invalid."
but when I remove the "separateDialCode" option and enter the same number it would accept it normally

this is my input code:
<?= $form->field($model, 'phone_number')->widget(PhoneInput::className(), [ 'jsOptions' => [ 'onlyCountries' => array_values($countries['iso']), 'separateDialCode' => true, 'allowDropdown' => false, ], ] ])

and this is my validation code in the model

[['phone_number'], PhoneInputValidator::className()]

and I'm using the version '0.1.2'

@IvVasSms
Copy link

Same problem.

@combinator
Copy link

same problem here

@kv4nt
Copy link

kv4nt commented Jul 30, 2019

Same problem

@Unlite
Copy link

Unlite commented Feb 3, 2021

same

@vidhi-borad
Copy link

same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants