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
Class | Description |
---|---|
Illuminate\Validation\Validator
|
Traits
Trait | Description |
---|---|
FormatsMessages
|
|
ValidatesEmail
|
Methods
protected validateUsingCustomRule (string $attribute, mixed $value, Illuminate\Contracts\Validation\Rule $rule) : void
Validate an attribute using a custom rule object.
Property | Type | Description |
---|---|---|
$attribute | string |
string
|
$value | mixed |
mixed
|
$rule | Illuminate\Contracts\Validation\Rule |
Illuminate\Contracts\Validation\Rule
|
inherited public validateEmail (string $attribute, mixed $value, array $parameters) : bool
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.
Property | Type | Description |
---|---|---|
$attribute | string |
string
|
$value | mixed |
mixed
|
$parameters | array |
array
|
inherited protected getMessage (string $attribute, string $rule) : string
Get the validation message for an attribute and rule.
Property | Type | Description |
---|---|---|
$attribute | string |
string
|
$rule | string |
string
|
inherited protected getMessageInExtension (string $rule) : string
Calls the message()
method for an extended rule and returns the result as a string.
Property | Type | Description |
---|---|---|
$rule | string |
string
|
inherited protected hasMessageInExtension (string $rule) : bool
Determines if an extended rule has a message()
method that provides a fallback message.
Property | Type | Description |
---|---|---|
$rule | string |
string
|