Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293248

Avoid updating \Drupal\field_ui\Form\FieldConfigEditForm::$entity during validation

$
0
0

Problem/Motivation

It is common that form validators are validating the form values using form state. However, in some unique cases like \Drupal\Core\Field\FieldItemList::defaultValuesFormValidate, the validation depends on the actual entity that is attached to the form. In these cases, it is important that the entity is up-to-date, and that any normalizing done prior have been extracted to the entity, because otherwise the validation is not validating what it's supposed to validate.

In #3345149: Extra Default value field when adding a field with an unlimited values, we needed to add a manual call to \Drupal\Core\Entity\EntityForm::buildEntity to ensure that the entity has been updated which isn't ideal for DX.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 293248

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>