Validator

Winter CMS wrapper for the Laravel Validator class.

 class Winter\Storm\Validation\Validator
extends Illuminate\Validation\Validator
implements 
    Illuminate\Contracts\Validation\Validator

The only difference between this and the BaseValidator is that it resets the email validation rule to use the filter method by default.

It also does some custom handling of Rule objects through the FormatsMessages concern.

Extends

Traits

Methods

protected validateUsingCustomRule (string $attribute, mixed $value, Illuminate\Contracts\Validation\Rule $rule) : void

Validate an attribute using a custom rule object.

Parameters
Property Description
$attribute
string
$value
mixed
$rule
Illuminate\Contracts\Validation\Rule
Returns
void

inherited public validateEmail (string $attribute, mixed $value, array $parameters) : bool

Inherited from ValidatesEmail

Validate that an attribute is a valid e-mail address.

Laravel 5.8 and above, by default, use the RFCValidation provider as the default validation. To keep backwards compatibility, we intend to use the FilterEmailValidation provider.

Parameters
Property Description
$attribute
string
$value
mixed
$parameters
array
Returns
bool

inherited protected getMessage (string $attribute, string $rule) : string

Inherited from FormatsMessages

Get the validation message for an attribute and rule.

Parameters
Property Description
$attribute
string
$rule
string
Returns
string

inherited protected getMessageInExtension (string $rule) : string

Inherited from FormatsMessages

Calls the message() method for an extended rule and returns the result as a string.

Parameters
Property Description
$rule
string
Returns
string

inherited protected hasMessageInExtension (string $rule) : bool

Inherited from FormatsMessages

Determines if an extended rule has a message() method that provides a fallback message.

Parameters
Property Description
$rule
string
Returns
bool
Copyright © 2024 Winter CMS