isGooglePlusUrl method

FieldValidator<String?, String?> isGooglePlusUrl({
  1. MessageCallBack<String>? message,
  2. String? userName,
  3. String? id,
})

Check string is google plus url

Implementation

FieldValidator<String?, String?> isGooglePlusUrl({
  MessageCallBack<String>? message,
  String? userName,
  String? id,
}) {
  return next((messages, value) {
    if (value != null &&
        !value.isGooglePlusUrl(
          userName: userName,
          id: id,
        )) {
      return message?.call(messages, value) ??
          messages.invalidGooglePlusUrl(
            userName ?? 'empty',
            id ?? 'empty',
          );
    }
    return null;
  });
}