prohibitedIf()
prohibitedIf()
Section titled “prohibitedIf()”prohibitedIf($field, $value) rejects a non-empty value when the other field strictly equals the given value.
$rules->string('nickname') ->optional() ->prohibitedIf('accountType', 'business');The failure code is prohibited.