title: PHP multiple interfaces to implement validation functionality?
body: <p>I am trying to implement validation functionality on a website on which i am working.</p>
  
  <p>I have created an interface entitled Validator which my classes then implement. The single function in my interface is validate($input).</p>
  
  <p>Then I have a class e.g EmailValidator which now implements this. In its implementation of validate() it checks if the input is a valid email and returns true or false respectively.</p>
  
  <p>Now.. I want to implement a check whereby two inputs are sent and I check if they are equal. For example in the case of passwords. As this interface function only takes one input it is not suitable.</p>
  
  <p>I can create a second interface with a validate function which takes two inputs e.g PairValidator. Is this however the optimal way to implement what i want?</p>
  
  <p>My concern arise because due to the possibility of validation functions i may need i could plausibly have loads of interfaces e.g SetValidator for checking if a value is in a set..</p>
  
  <p>Thanks</p>