Open atomrus1993 opened 6 years ago
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.
i need rules only integer, +, space, '(', ')'