<p dir="auto">When we create a form that's tied to an entity (meaning we pass an entity to createForm()), Form-&gt;isValid() should not validate the entire entity. Or there should at least be an option to disable this behavior.</p>
<p dir="auto">I have my form type and an entity. When there's a direct mapping between the 2 all works well. However, if I add a property to my entity with a constraint, Form-&gt;isValid() calls will fail if the field's value doesn't pass. This means the form will validate entity fields that aren't a part of the form.</p>
<p dir="auto">The only solution I've seen posed is to use validation groups on the entity but this is implying validation rules on my entities that may not be accurate (perhaps my validation constraints on my entity are all the defaults. Requiring me to group constraints for form handling in another layer doesn't seem right). Form validation should validate form fields. If the form wants to work with entity fields, it would ideally only validate the fields that are specified in the form (or be configurable).</p>
<p dir="auto">The Drupal project uses the YAML parser component provided by symfony, but we also need<br>
some sort of imports, as provided by the Config component. That one is though not used by Drupal.</p>
<p dir="auto">Would there be a possiblities to provide some simple functionality to allow imports relative to the YML file itself?</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="foo.baz:
  path: '/foo/baz
  defaults:
    _controller: '\Drupal\foo\FooController::baz'
imports:
  - routes/foo.admin.routing.yml
  - routes/foo.pages.routing.yml
"><pre class="notranslate"><code class="notranslate">foo.baz:
  path: '/foo/baz
  defaults:
    _controller: '\Drupal\foo\FooController::baz'
imports:
  - routes/foo.admin.routing.yml
  - routes/foo.pages.routing.yml

</code></pre></div>
<p dir="auto">Technically I would agree that this would not belong into the Yaml component though.</p>