Package eltos.simpledialogfragment.form
Interface SimpleFormDialog.InputValidator
- Enclosing class:
- SimpleFormDialog
public static interface SimpleFormDialog.InputValidator
-
Method Summary
-
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 forInput
fields. You may also useInput.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 fragmentfieldKey
- the key of the field as supplied when the correspondingInput
was created (seeInput.plain(String)
etc)input
- the text entered by the userextras
- the extras passed withSimpleDialog.extra(Bundle)
- Returns:
- the error message to display or null if the input is valid
-