<p dir="auto"><strong>Symfony version(s) affected</strong>: all</p>
<p dir="auto"><strong>Description</strong></p>
<p dir="auto">When a form field is disabled but a value is submitted to it regardless, the value is silently ignored. This can be confusing to the user - when he opened the form the field was not disabled but something changed in the system while he was filling it so the field is disabled now. The value is then silently ignored but the user gets no notification about the problem.</p>
<p dir="auto"><strong>How to reproduce</strong></p>
<p dir="auto">Create a form field that has the <code class="notranslate">'disabled'</code> option active conditionally. Open the form in one window while the field is enabled, then do something in another window causing it to be disabled and then submit the form in the first window.</p>
<p dir="auto"><strong>Possible Solution</strong></p>
<p dir="auto">Submitting a value into a disabled field should cause a validation error on the form field in question so that the user knows about the change.</p>
<p dir="auto">The validation of an image I have:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="        photo:
            - Image: { maxSize: 2M, maxSizeMessage: &quot;the size is bigger than {{ limit }}, please change the photo file.&quot; }
            - NotBlank: { groups: [registration], message: &quot;Please select an photo.&quot; }"><pre class="notranslate">        <span class="pl-ent">photo</span>:
            - <span class="pl-ent">Image</span>: <span class="pl-s">{ maxSize: 2M, maxSizeMessage: "the size is bigger than {{ limit }}, please change the photo file." }</span>
            - <span class="pl-ent">NotBlank</span>: <span class="pl-s">{ groups: [registration], message: "Please select an photo." }</span></pre></div>
<p dir="auto">everything works great except that the maxSizeMessage don't show, only appear the default symfony photo.<br>
I've removed the  {{ limit }} to test and still it persists</p>