title: jsf validate two fields in one time
body: <p>can I validate two interdependent fields in with one validator?</p>
  
  <pre><code>     &lt;h:form>
              &lt;h:inputText value="#{logRegBean.person.name}" >
                  &lt;f:validator validatorId="loginCorrectValidator" />
              &lt;/h:inputText>
              &lt;h:inputSecret value="#{logRegBean.person.password}" />
              &lt;h:commandButton action="#{logRegBean.login}" />
          &lt;/h:form>
  </code></pre>
  
  <p>I want to search for the user in the DB and if there is the user, I'll test if the passwords(in db and inputted) match. But how can I access even the password field in one validator? I tried to evaluate the value int the other field via <code>createValueExpression()</code>, but it looks like I can't access the value in that time since I always get empty strings.</p>