Skip to content

prohibitedUnless()

prohibitedUnless($field, $value) rejects a non-empty value when the other field does not strictly equal the given value.

$rules->string('businessLicense')
->optional()
->prohibitedUnless('accountType', 'business');

The failure code is prohibited.