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

[Validator] Double validation in an unusual case #22538

Copy link
Copy link
Closed
@fancyweb

Description

@fancyweb
Issue body actions
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.2.7

Hello everyone, as the title says, I have found another case of double validation.

My classes :

interface PriceInterface {}
interface VariantPriceInterface extends PriceInterface {}
abstract class AbstractPrice implements PriceInterface {}
class VariantSamplePrice extends AbstractPrice implements VariantPriceInterface {}

The validation constraints :

PriceInterface:
    getters:
        value:
            - NotBlank: ~

If you validate a VariantSamplePrice, the constraint is checked twice.

This case is taken from a real project. I reproduced the issue on my symfony-standard fork https://github.com/fancyweb/symfony-standard/tree/new-double-validation-issue. Just launch the local server and go on the homepage route.

Related issue #19943

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.