I have used Saripaar successfully within activities, but now, when I use it with DialogFragment, it always go to onSuccess even in wrong input as well.
My Fragment is implementing ValidationListener and Validator is initialized in onCreate() of Fragment as well.
Does anyone has idea about its behaviour in fragments..???
Here is my code over view...
public class MyDialogFragment extends DialogFragment implements ValidationListener {
// Declaring validator
private Validator validator;
// views to validate
@Required(order = 1)
@TextRule(order = 5, minLength = 6, message = "Enter at least 6 characters.")
private EditText nameEditText;
@Required(order = 2)
private EditText addressEditText;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Initializing validation process
validator = new Validator(getActivity()); /*====*/
validator.setValidationListener(this);
}
positiveButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// Validating on positive button event
validator.validate();
}
});
}
// Here are the validation listener methods to implemented
// Just copy pasted from you github account tutorial page
}
Every thing seems right...onSuccess event is invoking perfectly everytime...Don't know what is the issue actually, or where im doing something wrong...
One thing i suspect is, call to getActivity() in line validator = new Validator(getActivity()); might cause issue, like your implementation is depending on context of activity, and in dialog fragment, we are out of context some what...well, you can guess it better...:)

Try this,
instead of
Also, please use the latest source. The jar is a bit outdated. Let me know if this helps.