class Factory implements Factory (View source)
protected Translator | $translator | The Translator implementation. | |
protected PresenceVerifierInterface | $verifier | The Presence Verifier implementation. | |
protected Container | $container | The IoC container instance. | |
protected array | $extensions | All of the custom validator extensions. | |
protected array | $implicitExtensions | All of the custom implicit validator extensions. | |
protected array | $dependentExtensions | All of the custom dependent validator extensions. | |
protected array | $replacers | All of the custom validator message replacers. | |
protected array | $fallbackMessages | All of the fallback messages for custom rules. | |
protected Closure | $resolver | The Validator resolver instance. |
void | __construct(Translator $translator, Container $container = null) Create a new Validator factory instance. | |
Validator | make(array $data, array $rules, array $messages = [], array $customAttributes = []) Create a new Validator instance. | |
array | validate(array $data, array $rules, array $messages = [], array $customAttributes = []) Validate the given data against the provided rules. | |
Validator | resolve(array $data, array $rules, array $messages, array $customAttributes) Resolve a new Validator instance. | |
void | addExtensions(Validator $validator) Add the extensions to a 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 | extendDependent(string $rule, Closure|string $extension, string|null $message = null) Register a custom dependent validator extension. | |
void | replacer(string $rule, Closure|string $replacer) Register a custom validator message replacer. | |
void | resolver(Closure $resolver) Set the Validator instance resolver. | |
Translator | getTranslator() Get the Translator implementation. | |
PresenceVerifierInterface | getPresenceVerifier() Get the Presence Verifier implementation. | |
void | setPresenceVerifier(PresenceVerifierInterface $presenceVerifier) Set the Presence Verifier implementation. |
Create a new Validator factory instance.
Create a new Validator instance.
Validate the given data against the provided rules.
Resolve a new Validator instance.
Add the extensions to a validator instance.
Register a custom validator extension.
Register a custom implicit validator extension.
Register a custom dependent validator extension.
Register a custom validator message replacer.
Set the Validator instance resolver.
Get the Translator implementation.
Get the Presence Verifier implementation.
Set the Presence Verifier implementation.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/8.x/Illuminate/Validation/Factory.html