Welcome Guest, Not a member yet? Register   Sign In
not_in_list form validation
#2

(This post was last modified: 01-28-2020, 12:17 PM by donpwinston.)

You shouldn't be modifying stuff in the system directory. Create app/Validation/MyRules.php with the class MyRules(or whatever name you want to call it) that has the method not_in_list(). Make sure you namespace it with App\Validation. Then add \App\Validation\MyRules::class to the $ruleSets array property in  app/Config/Validation.php.

Now when you update CI4 your rules won't get wiped out.
Simpler is always better
Reply


Messages In This Thread
not_in_list form validation - by GotExx - 01-28-2020, 06:37 AM
RE: not_in_list form validation - by donpwinston - 01-28-2020, 12:14 PM
RE: not_in_list form validation - by GotExx - 01-29-2020, 06:25 AM
RE: not_in_list form validation - by donpwinston - 02-02-2020, 08:22 PM



Theme © iAndrew 2016 - Forum software by © MyBB