Suppose we want to ask the user at least one of two contacts via the input form: a phone and / or an email address. This means that in the validation rules there will be the required_without rule for both fields:
$this->validate($request, [ 'email' => 'required_without:tel|email', 'tel' => 'required_without:email|regex:/(01)[0-9]{9}/' ], $messages); We need to validate the data format only when they are entered, but in the code above the format is always checked. Since we need to know at least one contact, the rule sometimes does not fit.