Exists
class Exists extends ObjectValidationAttribute
Traits
Methods
static string
keyword()
Get the Validator rule keyword.
static ValidationAttribute
create(string ...$parameters)
Create the attribute from parsed string parameters.
static mixed
parseBooleanValue(mixed $value)
Parse a validation boolean value.
from
ValidationAttribute
from
ValidationAttribute
mixed
normalizePossibleExternalReferenceParameter(mixed $parameter)
Resolve a possible external reference parameter.
from
ValidationAttribute
object|string
void
applyDatabaseConstraints(Exists|Unique $rule, Closure|DatabaseConstraint|array $constraints)
Apply database constraints to a validation rule.
__construct(string|ExternalReference|null $table = null, string|ExternalReference|null $column = 'NULL', string|ExternalReference|null $connection = null, bool|ExternalReference $withoutTrashed = false, string|ExternalReference $deletedAtColumn = 'deleted_at', Closure|DatabaseConstraint|array|null $where = null, Exists|null $rule = null)
Create a new exists validation attribute.
Details
at line 94
static string
keyword()
Get the Validator rule keyword.
at line 102
static ValidationAttribute
create(string ...$parameters)
Create the attribute from parsed string parameters.
in
ValidationAttribute at line 30
string
__toString()
Get the rule in Validator string form.
in
ValidationAttribute at line 38
static protected mixed
parseDateValue(mixed $value)
Parse a validation date value.
in
ValidationAttribute at line 60
static protected mixed
parseBooleanValue(mixed $value)
Parse a validation boolean value.
in
ValidationAttribute at line 80
protected FieldReference
parseFieldReference(string|FieldReference $reference)
Parse a field reference.
in
ValidationAttribute at line 91
protected mixed
normalizePossibleExternalReferenceParameter(mixed $parameter)
Resolve a possible external reference parameter.
at line 43
object|string
getRule(ValidationPath $path)
Get the Validator rule object.
in
AppliesDatabaseConstraints at line 20
protected void
applyDatabaseConstraints(Exists|Unique $rule, Closure|DatabaseConstraint|array $constraints)
Apply database constraints to a validation rule.
at line 26
__construct(string|ExternalReference|null $table = null, string|ExternalReference|null $column = 'NULL', string|ExternalReference|null $connection = null, bool|ExternalReference $withoutTrashed = false, string|ExternalReference $deletedAtColumn = 'deleted_at', Closure|DatabaseConstraint|array|null $where = null, Exists|null $rule = null)
Create a new exists validation attribute.