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

fail validation how fix this?) #53

Open
atomrus1993 opened this issue Oct 15, 2018 · 1 comment
Open

fail validation how fix this?) #53

atomrus1993 opened this issue Oct 15, 2018 · 1 comment
Assignees

Comments

@atomrus1993
Copy link

image
image
image
i need rules only integer, +, space, '(', ')'

@Borales Borales self-assigned this Oct 15, 2018
@atomrus1993
Copy link
Author

atomrus1993 commented Oct 15, 2018

i add filter

['phone', 'filter', 'filter' => [$this, 'normalizePhone']],
public function normalizePhone($value) {
        $phone = preg_match("@[A-z]@u", $value);
        return !$phone ? $value : false;
}

if you know good method, please say me)

And please add this code to Readme.md

My problem is that if we enter the phone in my case for Russia, and if there is a letter, then the validator thinks everything is ok, but this is not so, so I wrote an example of how I realized that there were real data, the letters are not needed) Please add this to the description of your extension.

@atomrus1993 atomrus1993 changed the title how fix this?) fail validation how fix this?) Oct 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants