validator IS_URL() throws error for google group URLs

15 views
Skip to first unread message

Gaurav Vichare

unread,
Mar 29, 2017, 7:16:43 AM3/29/17
to web2py-users
I am using IS_URL() validator to validate URLs, but it doesn't accepts following url and similar google group urls


Should I create custom URL validato with simple regular expression?


Thank You
- Gaurav

Leonel Câmara

unread,
Mar 29, 2017, 10:05:15 AM3/29/17
to web2py-users
You should submit a patch to fix the IS_URL validator as this is actually a valid URL.

The problem seems to be the | character which is actually only valid in the fragment part of an URL.

If you do submit a patch make sure to also add this case as a test in test_validators.py

If you don't want to submit a patch at least create an issue in github so we can address it.
Reply all
Reply to author
Forward
0 new messages