validateValue method
Validates the value.
Returns null
if the value is valid, otherwise an error message.
Call validate() instead of this method when using the validator.
Implementation
@override
String? validateValue(String valueCandidate) {
return (regex != null && !regex!.hasMatch(valueCandidate)) ||
!isURL(
valueCandidate,
protocols: protocols,
requireTld: requireTld,
requireProtocol: requireProtocol,
allowUnderscore: allowUnderscore,
hostWhitelist: hostWhitelist,
hostBlacklist: hostBlacklist,
)
? errorText
: null;
}