title: Dynamic required validation for different buttons?
body: <p>I'm currently learning about jsf 2.0 from core jsf 2.0 book + glassfish + cdi.</p>
  
  <p>I have a question about the validation feature of JSF.</p>
  
  <p>Let's say i have a very simple login application, which has a very simple layout like :</p>
  
  <p>userid : (input field for userid - using required="true")<br>
  password : (input secret for password - using required="true")<br>
  loginButton + registerButton(using immediate="true") + checkUserIdAvailabilityButton  </p>
  
  <p>Now, let's say the loginButton is pressed, and the userid and password are left empty, validation error would occur on both of the fields, and that's working as what i intended.</p>
  
  <p>And when the registerButton is pressed, it doesnt care whether the userid or password is filled by the user, since it's using immediate="true", thus bypassing validation and the command gets executed at the apply request value phase, and that's still working as what i intended.</p>
  
  <p>And here comes my problem .. When the checkUserIdAvailabilityButton is pressed, i only expect the userid to be filled, and i dont need to care about whether the password field is filled or not, but the password field will throw error saying that it's a required field.</p>
  
  <p>Is there anyway to resolve this kind of problem ? I know this could be a very simple application, but in my working place, i think they design lots of screens like this, like the save button along with refresh button with different required fields but the buttons are in the same page.</p>
  
  <p>Thank you !</p>