Interface SimpleFormDialog.InputValidator

Enclosing class:
SimpleFormDialog

public static interface SimpleFormDialog.InputValidator
  • Method Summary

    Modifier and Type
    Method
    Description
    validate(String dialogTag, String fieldKey, String input, android.os.Bundle extras)
    Let the hosting fragment or activity implement this interface to make custom validations for Input fields.
  • Method Details

    • validate

      String validate(String dialogTag, String fieldKey, @Nullable String input, @NonNull android.os.Bundle extras)
      Let the hosting fragment or activity implement this interface to make custom validations for Input fields. You may also use Input.validatePattern(java.lang.String, java.lang.String) with a custom or predefined pattern. The method is called every time the user hits the positive button or next key.
      Parameters:
      dialogTag - the tag of this fragment
      fieldKey - the key of the field as supplied when the corresponding Input was created (see Input.plain(String) etc)
      input - the text entered by the user
      extras - the extras passed with SimpleDialog.extra(Bundle)
      Returns:
      the error message to display or null if the input is valid