Odd link field validation with html 5 validation disabled

Created on 19 March 2024, 6 months ago

Problem/Motivation

I've encountered what appears to be odd link field validation, at least the validation failure message doesn't seem to be proper (unless im missing something obvious)

Steps to reproduce

  1. Fresh install of Drupal 10.2.3
  2. Have a content type with a link field
  3. Set to internal only
  4. Disable html5 validation - can either do this via a form alter, or manually add 'no validate' to the markup to force server side validation
  5. Create a new node of the content type with the link field
  6. Add a title
  7. For the link field add www.drupal.org
  8. Try and save

Expected
Meaningful error message

Actual

Error message
Close
Manually entered paths should start with one of the following characters: / ? #

Which isn't strictly true, adding a scheme to the URL and it accepts it just fine (https://www.drupal.org) so the error message being returned doesn't seem accurate and is misleading

Proposed resolution

Better error message? Do we even consider this an issue?

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Closed: works as designed

Version

10.2

Component
Link 

Last updated 3 days ago

Created by

🇬🇧United Kingdom aaron.ferris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024