Skip to content

Commit 9cf198b

Browse files
committed
Added the dialog, which is validated by a Validator to the validator-method of this interface.
1 parent e88ea0a commit 9cf198b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

library/src/main/java/de/mrapp/android/dialog/MaterialDialog.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -996,9 +996,12 @@ public interface Validator {
996996
/**
997997
* Validates the content of a dialog.
998998
*
999+
* @param dialog
1000+
* The dialog, whose content should be validated, as an instance of the class {@link
1001+
* MaterialDialog}. The dialog may not be null
9991002
* @return True, if the content of the dialog is valid, false otherwise
10001003
*/
1001-
boolean validate();
1004+
boolean validate(@NonNull MaterialDialog dialog);
10021005

10031006
}
10041007

library/src/main/java/de/mrapp/android/dialog/listener/OnClickListenerWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public final void onClick(final View v) {
7575

7676
if (validate) {
7777
for (Validator validator : getDialog().getValidators()) {
78-
if (!validator.validate()) {
78+
if (!validator.validate(getDialog())) {
7979
return;
8080
}
8181
}

0 commit comments

Comments
 (0)