code: public static Validator<CharSequence> regex(@NonNull final Context context,
                                                  @NonNull final Pattern regex) {
          return new RegexValidator(context, R.string.default_error_message, regex);
      }
docs: Creates and returns a validator, which allows to validate texts to ensure, that they match
  certain regular expressions.
  
  @param context
  The context, which should be used to retrieve the error message, as an instance of
  the class {@link Context}. The context may not be null
  @param regex
  The regular expression, which should be used to validate the texts, as an instance of
  the class {@link Pattern}. The regular expression may not be null
  @return The validator, which has been created, as an instance of the type {@link Validator}