url static method

String? url(
  1. String? value
)

Implementation

static String? url(String? value) {
  if (value == null || value.trim().isEmpty) {
    return 'URL is required';
  }
  if (!_urlRegex.hasMatch(value.trim())) {
    return 'Please enter a valid URL';
  }
  return null;
}