extends abstract class Phalcon\Validation\Validator
implements Phalcon\Validation\ValidatorInterface
Source on GitHub
Check if a value is included into a list of values
use Phalcon\Validation\Validator\InclusionIn;
$validator->add('status', new InclusionIn([
'message' => 'The status must be A or B',
'domain' => array('A', 'B')
]));
$validator->add(['status', 'type'], new InclusionIn([
'message' => [
'status' => 'The status must be A or B',