Skip to content

Overriden rules of a property is not working when it's marked as #[WithoutValidation] #1094

@vaishnavyogesh

Description

@vaishnavyogesh

Hi team,

Seems like the example given here

https://spatie.be/docs/laravel-data/v4/getting-started/quickstart#:~:text=status%2C%0A%20%20%20%20%20%20%20%20%23%5B-,WithoutValidation,-%5D%0A%20%20%20%20%20%20%20%20public%20%3FImageData

is not working.

Also I've gone through the source code of DataValidationRulesResolver and it seems overwritten rules for a property marked with #[WithoutValidation] are getting ignore.

Please check: https://github.com/spatie/laravel-data/blob/main/src/Resolvers/DataValidationRulesResolver.php#L269

Let me know If I can contribute to it's fix or update the docs accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions