Skip to content

Allow symfony/validator [..]->atPath(...) to take "absolute" property-path #50965

Closed as not planned
@philepsybo

Description

@philepsybo

Description

I recently had an issue where the context in a custom validator was set inappropriately for my use-case.
Hence I couldn't use a custom-validation-constraint to achieve my goal as it would have been impossible to show the error at the correct form field as the set prefix set by atPath in ConstraintViolationBuilderInterface would not be the right one.

So the requested feature would be:

A flag-parameter or something similar that makes this behaviour of atPath switch to an "absolute" version, which doesn't get prefixed automatically.

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions