Input

Required With

Rule `required_with`: Requires the field when another field is present.

Usage

Use for coupled fields.

$schema = \Lemonade\Framework\Validation\ValidationSchema::create()
    ->field('field', 'Field')
        ->requiredWith('email')
        ->end();

$result = $validator->validate($payload, $schema);

Stable rule name

required_with for translations, registry lookup and per-rule messages.

Group

Required / Conditional