CI4 Validation how to set a different error message using 2 regex_match |
I have these rules
PHP Code: 'rules' => 'required|min_length[8]|max_length[50]|regex_match[/\d/]|regex_match[/[^a-zA-Z\d]/]', Is there a way to differentiate the text of the two regex_matches?
Create a custom rule.
See https://codeigniter4.github.io/CodeIgnit...stom-rules
(05-03-2022, 05:32 AM)kenjis Wrote: Create a custom rule. Yes, I have already created some custom rules, I was just thinking it was the only solution, but I asked in case there was a native way
It seems impossible.
It seems using a rule more than once is unexpected. |
Welcome Guest, Not a member yet? Register Sign In |