master

laravel/framework

Last updated at: 29/12/2023 09:21

ValidatorAwareRule.php

TLDR

This file defines the ValidatorAwareRule interface, which requires implementing classes to have a setValidator method.

Methods

setValidator(Validator $validator)

This method is used to set the current validator for the implementing class.

END

<?php

namespace Illuminate\Contracts\Validation;

use Illuminate\Validation\Validator;

interface ValidatorAwareRule
{
    /**
     * Set the current validator.
     *
     * @param  \Illuminate\Validation\Validator  $validator
     * @return $this
     */
    public function setValidator(Validator $validator);
}