I need a custom validator for urls with 2 conditions:
first condition - it starst with http(s)://
second condition the left part of url, before first single slash (or till the end of line if single slash not detected) should NOT contain whitespace, but after slash (if such exist), whitespace should be allowed
example:
prohibited url:
- https://www.exam ple.com/
- htt ps://www.example.com/
allowed url:
I wrote Regex expression
^(?:http(s)?:\/\/)[\S]+\/?
but it fails with url in example 1.