Skip to content

rename attribute Validate #30

@pamparam83

Description

@pamparam83

The issue is that when reading such a declaration, it’s not clear that the Validate attribute does not work with Compare, because it operates only on raw input data before those values are actually assigned to the class properties.

#[Body('email')] 
#[Trim] 
#[Validate(
    new Required(),
    new Email(),
)]

In this example, it’s not obvious from the Validate attribute itself that the validation is performed only on the raw data.

I suggest renaming the #[Validate] attribute to #[ValidateRaw].

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions