title: Android Saripaar issue with fragments (DialogFragment)
body: <p>I have used Saripaar successfully within activities, but now, when I use it with <code>DialogFragment</code>, it always go to <code>onSuccess</code> even in wrong input as well.</p>
  
  <p>My <code>Fragment</code> is implementing <code>ValidationListener</code> and <code>Validator</code> is initialized in <code>onCreate()</code> of <code>Fragment</code> as well.</p>
  
  <p>Does anyone has idea about its behaviour in fragments..???</p>
  
  <hr>
  
  <p>Here is my code over view...</p>
  
  <pre><code>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
  }
  </code></pre>
  
  <p>Every thing seems right...onSuccess event is invoking perfectly everytime...Don't know what is the issue actually, or where im doing something wrong...</p>
  
  <p>One thing i suspect is, call to <code>getActivity()</code> in line <code>validator = new Validator(getActivity());</code> 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...:)</p>