interface Factory (View source)

Methods

make(array $data, array $rules, array $messages = [], array $attributes = [])

Create a new Validator instance.

void
extend(string $rule, Closure|string $extension, string|null $message = null)

Register a custom validator extension.

void
extendImplicit(string $rule, Closure|string $extension, string|null $message = null)

Register a custom implicit validator extension.

void
replacer(string $rule, Closure|string $replacer)

Register a custom implicit validator message replacer.

Details

Validator make(array $data, array $rules, array $messages = [], array $attributes = [])

Create a new Validator instance.

Parameters

array $data
array $rules
array $messages
array $attributes

Return Value

Validator

void extend(string $rule, Closure|string $extension, string|null $message = null)

Register a custom validator extension.

Parameters

string $rule
Closure|string $extension
string|null $message

Return Value

void

void extendImplicit(string $rule, Closure|string $extension, string|null $message = null)

Register a custom implicit validator extension.

Parameters

string $rule
Closure|string $extension
string|null $message

Return Value

void

void replacer(string $rule, Closure|string $replacer)

Register a custom implicit validator message replacer.

Parameters

string $rule
Closure|string $replacer

Return Value

void