You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Apparently, when using type="url" with ngPattern to validate the data, angular checks first if the URL is valid according to the URL_REGEXP regular expression, and then validates the pattern. So, the data will be valid if matches both regexps.
As URL_REGEXP only allows basic/standard protocols (http, https and ftp), it is not possible to use the url type for URLs such as git://..., ssh://... or just myprotocol://..., which can make sense to use in an application.
Having an option to disable the url validation when using ngPattern would fix the issue.
The text was updated successfully, but these errors were encountered:
@IgorMinar WTDY of this? It shouldn't be too different from navigator.registerProtocolHandler(), I mean if the platform exposes that, there's probably no reason why we couldn't have a similar thing, for both ngSanitize as well as the form controls
Anyways, I'm not sure how frequently this gets run into, but I don't think it should take much code to support, so unless someone says otherwise, PRs welcome
Apparently, when using
type="url"
withngPattern
to validate the data, angular checks first if the URL is valid according to theURL_REGEXP
regular expression, and then validates the pattern. So, the data will be valid if matches both regexps.As
URL_REGEXP
only allows basic/standard protocols (http, https and ftp), it is not possible to use the url type for URLs such asgit://...
,ssh://...
or justmyprotocol://...
, which can make sense to use in an application.Having an option to disable the url validation when using
ngPattern
would fix the issue.The text was updated successfully, but these errors were encountered: