Added validation for URL format