A validator for urls based on partial pattern matching