Fixed validation when there are multiple slashes in string