I have a trouble with xor validation.
I want to validate with given two input.
For example,
$input1 = true;
$input2 = true;
$result = validateFunction($input1, $input2);
// $result is false
true is allowed only one input. If both of the input is true, I want to restrict.
I thought it can be achieved by function($context){}.
However, notEmpty and allowEmpty are not suitable.
Because one of the input should be empty if $result is false.
And notEmpty and allowEmpty don't force the input empty.
I should make custom validation rule, I think.
Anyone have any idea? Thank you very much.