I'm getting started with Struts 2 and I am trying to validate 2 text fields using Struts xml validators.
<s:textfield name="userName" id="userName" label="User Name">
<s:textfield name="passWord" id="userName" label="Password">
I was able to validate fields by clicking submit button.
Is it possible to validate fields even before clicking submit button? Conditions would be: when you try to enter password without userName, validate userName field and display error message if it's empty.
any help would appreciated.