class Exists extends ObjectValidationAttribute

Traits

Methods

static string
keyword()

Get the Validator rule keyword.

create(string ...$parameters)

Create the attribute from parsed string parameters.

string
__toString()

Get the rule in Validator string form.

static mixed
parseDateValue(mixed $value)

Parse a validation date value.

static mixed
parseBooleanValue(mixed $value)

Parse a validation boolean value.

parseFieldReference(string|FieldReference $reference)

Parse a field reference.

mixed
normalizePossibleExternalReferenceParameter(mixed $parameter)

Resolve a possible external reference parameter.

object|string
getRule(ValidationPath $path)

Get the Validator rule object.

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.

Return Value

string

at line 102
static ValidationAttribute create(string ...$parameters)

Create the attribute from parsed string parameters.

Parameters

string ...$parameters

Return Value

ValidationAttribute

string __toString()

Get the rule in Validator string form.

Return Value

string

static protected mixed parseDateValue(mixed $value)

Parse a validation date value.

Parameters

mixed $value

Return Value

mixed

static protected mixed parseBooleanValue(mixed $value)

Parse a validation boolean value.

Parameters

mixed $value

Return Value

mixed

protected FieldReference parseFieldReference(string|FieldReference $reference)

Parse a field reference.

Parameters

string|FieldReference $reference

Return Value

FieldReference

protected mixed normalizePossibleExternalReferenceParameter(mixed $parameter)

Resolve a possible external reference parameter.

Parameters

mixed $parameter

Return Value

mixed

at line 43
object|string getRule(ValidationPath $path)

Get the Validator rule object.

Parameters

ValidationPath $path

Return Value

object|string

protected void applyDatabaseConstraints(Exists|Unique $rule, Closure|DatabaseConstraint|array $constraints)

Apply database constraints to a validation rule.

Parameters

Exists|Unique $rule
Closure|DatabaseConstraint|array $constraints

Return Value

void

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.

Parameters

string|ExternalReference|null $table
string|ExternalReference|null $column
string|ExternalReference|null $connection
bool|ExternalReference $withoutTrashed
string|ExternalReference $deletedAtColumn
Closure|DatabaseConstraint|array|null $where
Exists|null $rule