Thanks for posting your solution BFlokstra! Are you validating in a config file or in the controller?
I've been trying to solve the same issue in the 'In Model' validation (i.e. setting the model property (array) $validationRules) like this:
Code:
protected $validationRules = [
'A_code' => 'required|alpha|exact_length[2]',
'B_code' => 'required|is_natural|max_length[3]',
'BB_code' => 'required|alpha|is_unique[bcca.BB_code,bcca.bcca_id,'.$id.']',
];
But I'm getting this error:
Code:
ErrorException #64
Constant expression contains invalid operations search →
APPPATH\Models\Administration\BccaModel.php at line 14
Anyone?