making fields validation at the same time
<p>I have 3 fields (name, password, email). I want to check if they are valid or not. I wrote the following</p>

<pre><code> public boolean isValidInput() {
     if(name.isValid()){
         return false;
       }
      if(password.isInValid()){
         return false;
       }
       if(email.isInValid()){
         return false;
       }
      return true;
  }
</code></pre>

<p>so this will give me a single invalid. But what to do if I want to show the invalids all at the same time?</p>