Validator::__call()

mixed __call(string $method, array $parameters) Handle dynamic calls to class methods. Parameters string $method array $parameters Return Value mixed Exceptions BadMethodCallException

Validator::validate()

void validate() Run the validator's rules against its data. Return Value void Exceptions ValidationException

Validator::valid()

array valid() Returns the data which was valid. Return Value array

Validator::swap()

static void swap(mixed $instance) Hotswap the underlying instance behind the facade. Parameters mixed $instance Return Value void

Validator::sometimes()

void sometimes(string $attribute, string|array $rules, callable $callback) Add conditions to a given field based on a Closure. Parameters string $attribute string|array $rules callable $callback Return Value void

Validator::sometimes()

void sometimes(string $attribute, string|array $rules, callable $callback) Add conditions to a given field based on a Closure. Parameters string $attribute string|array $rules callable $callback Return Value void

Validator::shouldReceive()

static Expectation shouldReceive() Initiate a mock expectation on the facade. Return Value Expectation

Validator::setValueNames()

$this setValueNames(array $values) Set the custom values on the validator. Parameters array $values Return Value $this

Validator::setTranslator()

void setTranslator(TranslatorInterface $translator) Set the Translator implementation. Parameters TranslatorInterface $translator Return Value void

Validator::setRules()

$this setRules(array $rules) Set the validation rules. Parameters array $rules Return Value $this