Use a custom function to validate this field (the validator will pass 2 params to the custom function, first $data and as second the params you gave to the rule)
Signature
public function __construct(string
$field,
[string
$errorMsg = NULL,
[string
$errorMsgType = 'error',
[
$args = NULL]]] )
Parameters
$field
—
string
name of the field
$errorMsg
—
string
the message to be displayed
$errorMsgType
—
string
the css class added to the field on validation error