class DistinctArrayItems implements ValidationRule (View source)

Methods

void
validate(string $attribute, mixed $value, Closure $fail)

Run the validation rule.

Details

void validate(string $attribute, mixed $value, Closure $fail)

Run the validation rule.

Laravel's "distinct" rule does not compare array items, so this rule compares them by content.

Parameters

string $attribute
mixed $value
Closure $fail

Return Value

void