title: CommandButton that checks some required fields but not all of them
body: <p>I'm trying to do something similar to this:</p>
  
  <pre><code>&lt;h:form id="form"&gt;
      &lt;p:inputText id="input1" value="#{mb.input}" required="true" /&gt;&lt;br /&gt;
      &lt;h:panelGroup id="panelGroup"&gt;&lt;br /&gt;
          &lt;p:inputText id="input2" required="true" /&gt;&lt;br /&gt;
          &lt;p:commandButton id="doSomething" value="something" action="#{mb.doSomething}" /&gt;
      &lt;/h:panelGroup&gt;&lt;br /&gt;
      &lt;p:commandButton id="save" value="Save" action="#{mb.save}" /&gt;&lt;br /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p></p>
  
  <p>Here is my problem: when I hit the <code>save</code> button I want the whole form to be validated where <code>required="true"</code> (for both <code>input1</code> and <code>input2</code>, which works fine).</p>
  
  <p>BUT, when I hit the <code>doSomething</code> button I would like it to check only if <code>input2</code> is filled, ignoring the condition of <code>input1</code> (in other words: it shouldn't work if <code>input2</code> is empty but should work even if <code>input1</code> is). Is there a way to do it? (And I can't use Managed Beans for that!)      </p>