UrlValidator constructor
UrlValidator({
- List<
String> protocols = const <String>['http', 'https', 'ftp'], - bool requireTld = true,
- bool requireProtocol = false,
- bool allowUnderscore = false,
- List<
String> hostWhitelist = const <String>[], - List<
String> hostBlacklist = const <String>[], - RegExp? regex,
- String? errorText,
- bool checkNullOrEmpty = true,
Constructor for the URL validator.
Implementation
UrlValidator({
this.protocols = const <String>['http', 'https', 'ftp'],
this.requireTld = true,
this.requireProtocol = false,
this.allowUnderscore = false,
this.hostWhitelist = const <String>[],
this.hostBlacklist = const <String>[],
this.regex,
/// {@macro base_validator_error_text}
super.errorText,
/// {@macro base_validator_null_check}
super.checkNullOrEmpty,
}) : _ipValidator = IpValidator(regex: regex, errorText: errorText);