UrlValidationController constructor

UrlValidationController({
  1. String message = 'Invalid url',
  2. bool required = false,
})

Implementation

UrlValidationController(
    {String message = 'Invalid url', bool required = false})
    : super(
          message: message,
          isValid: ({controller}) {
            String? textValue = controller?.rawValue?.toString();
            if (!required && TextUtils.isEmpty(textValue)) return true;
            return Validators.isURL(textValue);
          });