-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Can't use validate with regex_match[] #1084
Comments
Did it crash, or just not give the results you intended? If it crashed, what error did it throw? Can you provide a phone number (fake preferred) that it should match? |
An error occured by the character ] in regex pattern. i tested print_r($pattern) in function regex_match on file system/Validation/FormatRules.php then it not match with input pattern. Phone number: https://github.com/datnq/Vietnamese-mobile-carrier Thanks |
'rules' => 'required|min_length[2]|max_length[20]|regex_match[/^(01[2689]|09)[0-9]{8}$/]' |
I think it should be designed this way This is more reasonable |
@jinmarcus did this work in CI3? Trying to figure out if I broke something in the conversion. |
@lonnieezell it didn't. i just tested it |
Hi
I use pattern = "/^(01[2689]|09)[0-9]{8}$/" , regex phone number of Viet Nam but it not work
https://bcit-ci.github.io/CodeIgniter4/libraries/validation.html
My Code
Thanks !!
The text was updated successfully, but these errors were encountered: