Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

When constraint- Pass context and root to the list of available variables for expression language #58511

Copy link
Copy link
Closed
@KoNekoD

Description

@KoNekoD
Issue body actions

Description

I encountered a problem with validation of nested entities and I needed to validate by parent field, if draft true then no validation is needed

Example fix-feature for my case study:

$variables['value'] = $value;
$variables['this'] = $context->getObject();
$variables['context'] = $context;
$variables['root'] = $context->getRoot();

What do you think about me creating a Pull Request with this addition?

Example

$variables['value'] = $value;
$variables['this'] = $context->getObject();
$variables['context'] = $context;
$variables['root'] = $context->getRoot();

\Symfony\Component\Validator\Constraints\WhenValidator

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.