Extends UrlValidator to support custom regex

This PR is related to [WW-4198](https://issues.apache.org/jira/browse/WW-4198)