Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
link.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Nov 2019 at 02:27 UTC
Updated:
23 Jan 2026 at 14:29 UTC
Jump to comment: Most recent
Comments
Comment #9
dcam commentedI started working on this, but realized it's postponed on #3077149: Duplicate inline form errors in external Link widgets because we need the fix for inline form errors to be integrated into the validators.
Comment #10
dcam commentedThis is unblocked.
Comment #12
dcam commentedI'm removing the change to the "The @uri field is required when the @title field is specified" validation from the issue. I tried writing a constraint validator for it, but it didn't work. The reason why is because the
isEmpty()validation kicks in before the constraint validation. So if the URI is empty and the title is not, then Drupal simply thinks the whole field is empty and never checks any constraints. As far as I can tell, this has to remain as a form-level validation.Comment #13
dcam commentedI realized that we need to deprecate
LinkWidget::validateTitleElement()instead of deleting it.Comment #14
smustgrave commentedQuestion is there a way to call the constraint from the deprecated function? So we know it's a 1 to 1 replacement?
Comment #15
dcam commented@smustgrave I don't think so. The constraint validator seems incompatible with form validation as far as I can tell. Did you have any thoughts about how?
Comment #16
smustgrave commentedSeems like a good deprecation and update
Comment #18
catchCommitted/pushed to 11.x, thanks!