Skip to content

Rule does not receive previous rule's validated value of the same row #11

@FahimSakib

Description

@FahimSakib

The custom rules (i.e. UniqueRule()) is not receiving the validated value from the previous rule validation of the same row (if there are any), instead it receive the original value.

Example:

$validated = $request->validate([
            'title' => ['required', 'sanitize:text', new UniqueRule(Tag::class, 'title')],
        ]);

Here, the UniqueRule() does not receiving the sanitized text value although it has a rule "sanitize:text" before the UniqueRule().

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions