trait CanBeValidated (View source)

Properties

protected bool|Closure $isRequired
protected string|Closure|null $regexPattern
protected array $rules
protected array $validationMessages
protected string|Closure|null $validationAttribute

Methods

activeUrl(bool|Closure $condition = true)

No description

alpha(bool|Closure $condition = true)

No description

alphaDash(bool|Closure $condition = true)

No description

alphaNum(bool|Closure $condition = true)

No description

ascii(bool|Closure $condition = true)

No description

confirmed(bool|Closure $condition = true)

No description

doesntStartWith(Arrayable|string|Closure $values, bool|Closure $condition = true)

No description

doesntEndWith(Arrayable|string|Closure $values, bool|Closure $condition = true)

No description

endsWith(Arrayable|string|Closure $values, bool|Closure $condition = true)

No description

enum(string|Closure $enum)

No description

exists(string|Closure|null $table = null, string|Closure|null $column = null, Closure|null $modifyRuleUsing = null)

No description

filled(bool|Closure $condition = true)

No description

hexColor(bool|Closure $condition = true)

No description

in(Arrayable|string|Closure $values, bool|Closure $condition = true)

No description

ip(bool|Closure $condition = true)

No description

ipv4(bool|Closure $condition = true)

No description

ipv6(bool|Closure $condition = true)

No description

json(bool|Closure $condition = true)

No description

macAddress(bool|Closure $condition = true)

No description

multipleOf(int|float|Closure $value)

No description

notIn(Arrayable|string|Closure $values, bool|Closure $condition = true)

No description

notRegex(string|Closure|null $pattern)

No description

nullable(bool|Closure $condition = true)

No description

prohibited(bool|Closure $condition = true)

No description

prohibitedIf(string|Closure $statePath, mixed $stateValues, bool $isStatePathAbsolute = false)

No description

prohibitedUnless(string|Closure $statePath, mixed $stateValues, bool $isStatePathAbsolute = false)

No description

prohibits(array|string|Closure $statePaths, bool $isStatePathAbsolute = false)

No description

required(bool|Closure $condition = true)

No description

requiredIf(string|Closure $statePath, mixed $stateValues, bool $isStatePathAbsolute = false)

No description

requiredIfAccepted(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

requiredUnless(string|Closure $statePath, mixed $stateValues, bool $isStatePathAbsolute = false)

No description

requiredWith(string|array|Closure $statePaths, bool $isStatePathAbsolute = false)

No description

requiredWithAll(string|array|Closure $statePaths, bool $isStatePathAbsolute = false)

No description

requiredWithout(string|array|Closure $statePaths, bool $isStatePathAbsolute = false)

No description

requiredWithoutAll(string|array|Closure $statePaths, bool $isStatePathAbsolute = false)

No description

regex(string|Closure|null $pattern)

No description

startsWith(Arrayable|string|Closure $values, bool|Closure $condition = true)

No description

string(bool|Closure $condition = true)

No description

ulid(bool|Closure $condition = true)

No description

uuid(bool|Closure $condition = true)

No description

rule(mixed $rule, bool|Closure $condition = true)

No description

rules(string|array|Closure $rules, bool|Closure $condition = true)

No description

after(string|Closure $date, bool $isStatePathAbsolute = false)

No description

afterOrEqual(string|Closure $date, bool $isStatePathAbsolute = false)

No description

before(string|Closure $date, bool $isStatePathAbsolute = false)

No description

beforeOrEqual(string|Closure $date, bool $isStatePathAbsolute = false)

No description

different(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

gt(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

gte(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

lt(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

lte(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

same(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

unique(string|Closure|null $table = null, string|Closure|null $column = null, Model|Closure|null $ignorable = null, bool $ignoreRecord = false, Closure|null $modifyRuleUsing = null)

No description

distinct(bool|Closure $condition = true)

No description

validationAttribute(string|Closure|null $label)

No description

validationMessages(array $messages)

No description

string|null
getRegexPattern()

No description

string
getRequiredValidationRule()

No description

string
getValidationAttribute()

No description

array
getValidationMessages()

No description

array
getValidationRules()

No description

void
dehydrateValidationMessages(array $messages)

No description

void
dehydrateValidationRules(array $rules)

No description

void
dehydrateValidationAttributes(array $attributes)

No description

bool
isRequired()

No description

dateComparisonRule(string $rule, string|Closure $date, bool $isStatePathAbsolute = false)

No description

fieldComparisonRule(string $rule, string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

multiFieldComparisonRule(string $rule, array|string|Closure $statePaths, bool $isStatePathAbsolute = false)

No description

multiFieldValueComparisonRule(string $rule, string|Closure $statePath, mixed $stateValues, bool $isStatePathAbsolute = false)

No description

Details

CanBeValidated activeUrl(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated alpha(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated alphaDash(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated alphaNum(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated ascii(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated confirmed(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated doesntStartWith(Arrayable|string|Closure $values, bool|Closure $condition = true)

No description

Parameters

Arrayable|string|Closure $values
bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated doesntEndWith(Arrayable|string|Closure $values, bool|Closure $condition = true)

No description

Parameters

Arrayable|string|Closure $values
bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated endsWith(Arrayable|string|Closure $values, bool|Closure $condition = true)

No description

Parameters

Arrayable|string|Closure $values
bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated enum(string|Closure $enum)

No description

Parameters

string|Closure $enum

Return Value

CanBeValidated

CanBeValidated exists(string|Closure|null $table = null, string|Closure|null $column = null, Closure|null $modifyRuleUsing = null)

No description

Parameters

string|Closure|null $table
string|Closure|null $column
Closure|null $modifyRuleUsing

Return Value

CanBeValidated

CanBeValidated filled(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated hexColor(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated in(Arrayable|string|Closure $values, bool|Closure $condition = true)

No description

Parameters

Arrayable|string|Closure $values
bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated ip(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated ipv4(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated ipv6(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated json(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated macAddress(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated multipleOf(int|float|Closure $value)

No description

Parameters

int|float|Closure $value

Return Value

CanBeValidated

CanBeValidated notIn(Arrayable|string|Closure $values, bool|Closure $condition = true)

No description

Parameters

Arrayable|string|Closure $values
bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated notRegex(string|Closure|null $pattern)

No description

Parameters

string|Closure|null $pattern

Return Value

CanBeValidated

CanBeValidated nullable(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated prohibited(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated prohibitedIf(string|Closure $statePath, mixed $stateValues, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $statePath
mixed $stateValues
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated prohibitedUnless(string|Closure $statePath, mixed $stateValues, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $statePath
mixed $stateValues
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated prohibits(array|string|Closure $statePaths, bool $isStatePathAbsolute = false)

No description

Parameters

array|string|Closure $statePaths
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated required(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated requiredIf(string|Closure $statePath, mixed $stateValues, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $statePath
mixed $stateValues
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated requiredIfAccepted(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $statePath
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated requiredUnless(string|Closure $statePath, mixed $stateValues, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $statePath
mixed $stateValues
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated requiredWith(string|array|Closure $statePaths, bool $isStatePathAbsolute = false)

No description

Parameters

string|array|Closure $statePaths
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated requiredWithAll(string|array|Closure $statePaths, bool $isStatePathAbsolute = false)

No description

Parameters

string|array|Closure $statePaths
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated requiredWithout(string|array|Closure $statePaths, bool $isStatePathAbsolute = false)

No description

Parameters

string|array|Closure $statePaths
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated requiredWithoutAll(string|array|Closure $statePaths, bool $isStatePathAbsolute = false)

No description

Parameters

string|array|Closure $statePaths
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated regex(string|Closure|null $pattern)

No description

Parameters

string|Closure|null $pattern

Return Value

CanBeValidated

CanBeValidated startsWith(Arrayable|string|Closure $values, bool|Closure $condition = true)

No description

Parameters

Arrayable|string|Closure $values
bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated string(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated ulid(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated uuid(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated rule(mixed $rule, bool|Closure $condition = true)

No description

Parameters

mixed $rule
bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated rules(string|array|Closure $rules, bool|Closure $condition = true)

No description

Parameters

string|array|Closure $rules
bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated after(string|Closure $date, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $date
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated afterOrEqual(string|Closure $date, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $date
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated before(string|Closure $date, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $date
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated beforeOrEqual(string|Closure $date, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $date
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated different(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $statePath
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated gt(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $statePath
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated gte(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $statePath
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated lt(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $statePath
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated lte(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $statePath
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated same(string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

Parameters

string|Closure $statePath
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated unique(string|Closure|null $table = null, string|Closure|null $column = null, Model|Closure|null $ignorable = null, bool $ignoreRecord = false, Closure|null $modifyRuleUsing = null)

No description

Parameters

string|Closure|null $table
string|Closure|null $column
Model|Closure|null $ignorable
bool $ignoreRecord
Closure|null $modifyRuleUsing

Return Value

CanBeValidated

CanBeValidated distinct(bool|Closure $condition = true)

No description

Parameters

bool|Closure $condition

Return Value

CanBeValidated

CanBeValidated validationAttribute(string|Closure|null $label)

No description

Parameters

string|Closure|null $label

Return Value

CanBeValidated

CanBeValidated validationMessages(array $messages)

No description

Parameters

array $messages

Return Value

CanBeValidated

string|null getRegexPattern()

No description

Return Value

string|null

string getRequiredValidationRule()

No description

Return Value

string

string getValidationAttribute()

No description

Return Value

string

array getValidationMessages()

No description

Return Value

array

array getValidationRules()

No description

Return Value

array

void dehydrateValidationMessages(array $messages)

No description

Parameters

array $messages

Return Value

void

void dehydrateValidationRules(array $rules)

No description

Parameters

array $rules

Return Value

void

void dehydrateValidationAttributes(array $attributes)

No description

Parameters

array $attributes

Return Value

void

bool isRequired()

No description

Return Value

bool

CanBeValidated dateComparisonRule(string $rule, string|Closure $date, bool $isStatePathAbsolute = false)

No description

Parameters

string $rule
string|Closure $date
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated fieldComparisonRule(string $rule, string|Closure $statePath, bool $isStatePathAbsolute = false)

No description

Parameters

string $rule
string|Closure $statePath
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated multiFieldComparisonRule(string $rule, array|string|Closure $statePaths, bool $isStatePathAbsolute = false)

No description

Parameters

string $rule
array|string|Closure $statePaths
bool $isStatePathAbsolute

Return Value

CanBeValidated

CanBeValidated multiFieldValueComparisonRule(string $rule, string|Closure $statePath, mixed $stateValues, bool $isStatePathAbsolute = false)

No description

Parameters

string $rule
string|Closure $statePath
mixed $stateValues
bool $isStatePathAbsolute

Return Value

CanBeValidated