By dcam on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.4.x
Introduced in version:
11.4.0
Issue links:
Description:
LinkWidget::validateTitleElement() is deprecated. Validation was moved to the LinkTitleRequiredConstraintValidator on the LinkItem field plugin instead. If your custom widget is for field_types: ['link'], then you can remove validateTitleElement() from your element's form validation with no replacement.
Before:
public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
$element['#element_validate'][] = [static::class, 'validateTitleElement'];
return $element;
}
After:
public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
// No replacement.
return $element;
}
Impacts:
Module developers