Action config validation may prevent models being saved
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3278080. --> Reported by: [jurgenhaas](https://www.drupal.org/user/168924) Related to !160 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Since we've introduced the validation of action configuration by executing the validate and submit callbacks in <code>\Drupal\eca\Entity\Eca::addAction</code> we're able to prevent invalid model from being saved as config entities.</p> <p>However, the problem is that our extensive support of tokens may prevent validation although being perfectly OK, when the used token will contain the proper value when being processed later.</p> <p>Example: the <code>Send email</code> action plugin validates that the <code>Recipient email address</code> field either contains a valid email address or a token that contains <code>:mail</code>.</p> <p>Other validations may fail for different reasons.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Don't know what we should do about this. Either validate configuration or always save models regardless of validation. There doesn't seem to be any middle ground. Suggestions?</p> > Related issue: [Issue #3238206](https://www.drupal.org/node/3238206)
issue