We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In case of data array key has dot, the validator broke.
$phpArray = [ 'google.com' => 'google', 'youtube.com' => 'youtube' ]; $rules = [ 'required' => ['google.com', 'youtube.com'] ]; $v = new \Valitron\Validator($phpArray); $v->rules($rules); echo $v->validate() ? "passed\n" : "failed\n"; print_r($v->errors());
failed Array ( [google.com] => Array ( [0] => Google.com is required ) [youtube.com] => Array ( [0] => Youtube.com is required ) )
The reason validation failed is that valitron recognize google.com as array like ...
google.com
['google' => ['com' => null]]
So I need a method to distinguish between dot syntax and normal dot. Such as google\.com {google.com}
google\.com
{google.com}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In case of data array key has dot, the validator broke.
Example
Result
The reason validation failed is that valitron recognize
google.com
as array like ...So I need a method to distinguish between dot syntax and normal dot. Such as
google\.com
{google.com}
The text was updated successfully, but these errors were encountered: