I've added a Link field to a Bean entity, the URL validation is enabled, the title and user tokens are disabled. When a bean object is created the validation does not seem to trigger, e.g. entering "Planters united." as the URL doesn't cause any problems and this is not a URL that exists internally. FYI that URL is then output as "http://example.com/Planters%20united." on the block view page. Shouldn't the validation trigger and complain that the entered value is invalid?

Comments

bisonbleu’s picture

I have a similar issue. I've added a link field to a Profile2 profile type. When the 'Validate URL ' option is enabled and I enter an invalid URL that ends with '.xyz' the form doesn't complain whatsoever and the profile is saved.

dqd’s picture

Title: Field validation never triggered when using link field with Bean entity » URL validation never triggered when using link field with Bean entity
Category: Bug report » Support request
Issue summary: View changes
Status: Active » Closed (outdated)

Both example outputs in this issue are valid URLs, depending on the settings and input conversion. xyz is a top-level domain name. Apart from that: Link module is in Drupal core now. I'll close this issue due to inactivity for 12 years and upcoming EOL of Drupal 7 in January 2025. While the project version for Drupal 7 will keep providing support for security issues and website breaking bug fixes for Drupal 7, we should try to minimize the open issues for Drupal 7 in the queue as much as possible. Thanks for the report and all the efforts in here. Feel free to re-open if you can provide a fix or found an additional related problem which increases the issue priority to "Critical" here.