<p dir="auto">Hi !</p>
<p dir="auto">I have this kind of code :</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="interface FooInterface {}
abstract class AbstractBar implements FooInterface{}
class Baz extends AbstractBar {}

$object = new Baz();
$validator-&gt;validate($object, null, ['validator_group']);"><pre class="notranslate"><span class="pl-k">interface</span> <span class="pl-v">FooInterface</span> {}
<span class="pl-k">abstract</span> <span class="pl-k">class</span> <span class="pl-v">AbstractBar</span> <span class="pl-k">implements</span> <span class="pl-v">FooInterface</span>{}
<span class="pl-k">class</span> <span class="pl-v">Baz</span> <span class="pl-k">extends</span> <span class="pl-v">AbstractBar</span> {}

<span class="pl-s1"><span class="pl-c1">$</span>object</span> = <span class="pl-k">new</span> <span class="pl-v">Baz</span>();
<span class="pl-s1"><span class="pl-c1">$</span>validator</span>-&gt;<span class="pl-en">validate</span>(<span class="pl-s1"><span class="pl-c1">$</span>object</span>, <span class="pl-c1">null</span>, [<span class="pl-s">'validator_group'</span>]);</pre></div>
<p dir="auto">If i create a constraints validator on AbstractBar, like this :</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="AbstractBar:
    constraints:
        - MyConstraint:
            groups: [validator_group]"><pre class="notranslate"><span class="pl-ent">AbstractBar</span>:
    <span class="pl-ent">constraints</span>:
        - <span class="pl-ent">MyConstraint</span>:
            <span class="pl-ent">groups</span>: <span class="pl-s">[validator_group]</span></pre></div>
<p dir="auto">MyConstraint is called once.</p>
<p dir="auto">But if i just change AbstractBar by FooInterface in config :</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="FooInterface:
    constraints:
        - MyConstraint:
            groups: [validator_group]"><pre class="notranslate"><span class="pl-ent">FooInterface</span>:
    <span class="pl-ent">constraints</span>:
        - <span class="pl-ent">MyConstraint</span>:
            <span class="pl-ent">groups</span>: <span class="pl-s">[validator_group]</span></pre></div>
<p dir="auto">MyConstraint is called twice !</p>
<p dir="auto">I can't search why for now, someone could do it please ?</p>
<p dir="auto">I'm using UniqueEntity validation in a form and it works fine. (master branch)</p>
<p dir="auto">@UniqueEntity(fields={"gateway", "list", "address"})</p>
<p dir="auto">gateway is a relation, the others are scalar fields.</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
/**
  * @ORM\ManyToOne(targetEntity=&quot;Gateway&quot;, inversedBy=&quot;access_lists&quot;)
  * @ORM\JoinColumn(name=&quot;gateway_id&quot;, referencedColumnName=&quot;id&quot;, onDelete=&quot;CASCADE&quot;)
  */

private $gateway;
"><pre class="notranslate"><span class="pl-c">/**</span>
<span class="pl-c">  * @ORM\ManyToOne(targetEntity="Gateway", inversedBy="access_lists")</span>
<span class="pl-c">  * @ORM\JoinColumn(name="gateway_id", referencedColumnName="id", onDelete="CASCADE")</span>
<span class="pl-c">  */</span>

<span class="pl-k">private</span> <span class="pl-s1"><span class="pl-c1">$</span>gateway</span>;</pre></div>
<p dir="auto">BUT when i try to validate manually I get no error. The fields are populated correctly, I checked the values.</p>
<div class="highlight highlight-text-html-php notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
$validator = $this-&gt;get('validator');
$access_list = new AccessList();
$access_list-&gt;setGateway($gateway);
$access_list-&gt;setList('someval');
$access_list-&gt;setAddress('someval');

$errors = $validator-&gt;validate($access_list);

if (count($errors) &gt; 0) {
       throw new \Exception('duplicate');
}
"><pre class="notranslate"><span class="pl-s1"><span class="pl-c1">$</span>validator</span> = <span class="pl-s1"><span class="pl-c1">$</span><span class="pl-smi">this</span></span>-&gt;<span class="pl-en">get</span>(<span class="pl-s">'validator'</span>);
<span class="pl-s1"><span class="pl-c1">$</span>access_list</span> = <span class="pl-k">new</span> <span class="pl-v">AccessList</span>();
<span class="pl-s1"><span class="pl-c1">$</span>access_list</span>-&gt;<span class="pl-en">setGateway</span>(<span class="pl-s1"><span class="pl-c1">$</span>gateway</span>);
<span class="pl-s1"><span class="pl-c1">$</span>access_list</span>-&gt;<span class="pl-en">setList</span>(<span class="pl-s">'someval'</span>);
<span class="pl-s1"><span class="pl-c1">$</span>access_list</span>-&gt;<span class="pl-en">setAddress</span>(<span class="pl-s">'someval'</span>);

<span class="pl-s1"><span class="pl-c1">$</span>errors</span> = <span class="pl-s1"><span class="pl-c1">$</span>validator</span>-&gt;<span class="pl-en">validate</span>(<span class="pl-s1"><span class="pl-c1">$</span>access_list</span>);

<span class="pl-k">if</span> (count(<span class="pl-s1"><span class="pl-c1">$</span>errors</span>) &gt; <span class="pl-c1">0</span>) {
       <span class="pl-k">throw</span> <span class="pl-k">new</span> \<span class="pl-v">Exception</span>(<span class="pl-s">'duplicate'</span>);
}</pre></div>
<p dir="auto">The validation gives no errors. It accepts duplicate records.</p>