Custom form validation rule |
You do need to avoid using the pipe (|), because set_rules() will explode the rules on that character (so, in your rules, it would attempt to call a function named "{$current_title}]", and the is_unique rule definition is messed up because it's missing the closing bracket).
You should be able to pass anything you'd like in $field (except the pipe). CI's is_unique() function uses sscanf, but you don't have to. I would recommend using a different function name, though, and leaving is_unique() alone. Bonfire has a unique() function which does something similar to what you seem to be describing. |
Messages In This Thread |
Custom form validation rule - by jLinux - 08-29-2015, 11:20 AM
RE: Custom form validation rule - by jLinux - 08-30-2015, 09:00 AM
RE: Custom form validation rule - by CroNiX - 08-30-2015, 09:02 AM
RE: Custom form validation rule - by jLinux - 08-30-2015, 10:14 AM
RE: Custom form validation rule - by mwhitney - 08-31-2015, 09:35 AM
RE: Custom form validation rule - by jLinux - 09-05-2015, 10:07 AM
RE: Custom form validation rule - by mwhitney - 09-08-2015, 07:17 AM
|