url static method
Validate URL
Implementation
static String? url(String? value) {
if (value == null || value.isEmpty) {
return null; // URL is optional in most cases
}
if (!RegexPatterns.url.hasMatch(value)) {
return 'Please enter a valid URL';
}
return null;
}