Validator::__callStatic()

static mixed __callStatic(string $method, array $args) Handle dynamic, static calls to the object. Parameters string $method array $args Return Value mixed

Validator::valid()

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

Validator::validate()

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

Validator::swap()

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

Validator::setValueNames()

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

Validator::shouldReceive()

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

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::setTranslator()

void setTranslator(TranslatorInterface $translator) Set the Translator implementation. Parameters TranslatorInterface $translator 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::setData()

$this setData(array $data) Set the data under validation. Parameters array $data Return Value $this