class Factory implements Factory (View source)

Methods

void
__construct( TranslatorInterface $translator, Container $container = null)

Create a new Validator factory instance.

make( array $data, array $rules, array $messages = array(), array $customAttributes = array())

Create a new Validator instance.

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

Register a custom validator extension.

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

Register a custom implicit validator extension.

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

Register a custom implicit validator message replacer.

void
resolver( Closure $resolver)

Set the Validator instance resolver.

TranslatorInterface
getTranslator()

Get the Translator implementation.

getPresenceVerifier()

Get the Presence Verifier implementation.

void
setPresenceVerifier( PresenceVerifierInterface $presenceVerifier)

Set the Presence Verifier implementation.

Details

at line line 76
void __construct( TranslatorInterface $translator, Container $container = null)

Create a new Validator factory instance.

Parameters

TranslatorInterface $translator
Container $container

Return Value

void

at line line 91
Validator make( array $data, array $rules, array $messages = array(), array $customAttributes = array())

Create a new Validator instance.

Parameters

array $data
array $rules
array $messages
array $customAttributes

Return Value

Validator

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

Register a custom validator extension.

Parameters

string $rule
Closure|string $extension
string $message

Return Value

void

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

Register a custom implicit validator extension.

Parameters

string $rule
Closure|string $extension
string $message

Return Value

void

at line line 195
void replacer( string $rule, Closure|string $replacer)

Register a custom implicit validator message replacer.

Parameters

string $rule
Closure|string $replacer

Return Value

void

at line line 206
void resolver( Closure $resolver)

Set the Validator instance resolver.

Parameters

Closure $resolver

Return Value

void

at line line 216
TranslatorInterface getTranslator()

Get the Translator implementation.

Return Value

TranslatorInterface

at line line 226
PresenceVerifierInterface getPresenceVerifier()

Get the Presence Verifier implementation.

at line line 237
void setPresenceVerifier( PresenceVerifierInterface $presenceVerifier)

Set the Presence Verifier implementation.

Parameters

PresenceVerifierInterface $presenceVerifier

Return Value

void