Relative Content

Tag Archive for phpcodeigniter-4

Using validation rule ‘differs’ on Array Data

My controller receives JSON as POST data and passes it to the validator. There is some strange behavior using the differs[field_name]rule. I try to let the validator check, if one of the optional alias fields matches the value of name. But they all differ, so it should pass – I thought.
This is the stripped down controller:

Codeigniter 4 using validation rule ‘differs’ on Array Data

My controller receives JSON as POST data and passes it to the validator. There is some strange behavior using the differs[field_name]rule. I try to let the validator check, if one of the optional alias fields matches the value of name. But they all differ, so it should pass – I thought.
This is the stripped down controller:

Ci4 Routes in Subfolders

I know there are several question regarding this but still can’t get the answer and still got the problem.