URL validation to accept `public` and `private` urlscheme

Created on 25 April 2023, about 1 year ago
Updated 10 December 2023, 7 months ago

Problem/Motivation

The URL validation method from the jquery plugin supports http|https|ftp

https://github.com/jquery-validation/jquery-validation/blob/master/src/c...

But in the context of Drupal, there is `public` and `private` are also valid urlscheme

Therefore, if there is a URL field, most likely in Drupal admin, that accepts `public://` or `private://` at the back-end level, it wonโ€™t pass the front-end validation.

Steps to reproduce

Scenario of problem:

I have this issue with module Feeds

- Create a new feeds type at /admin/structure/feeds
- Choose Fetcher of type Upload file
- After the ajax call, in the Fetcher settings, field Upload directory with value `private://feeds` is then flagged as invalid URL

This similar symptom can be reproduce with other form with field URL.

๐Ÿ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

๐Ÿ‡จ๐Ÿ‡ฆCanada Robert Ngo Montreal โšœ๏ธ

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024