Skip to content

[Validator] Double validation in an unusual case #22538

Closed
@fancyweb

Description

@fancyweb
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