use <html:javascript> tag and add an attribute(i forgot the name) which contains validateUrFormname(this) to the form element... this will generate the script from the commons validator based on the rule you have specified in the validation.xml...
Or use the Struts 2 client side validation (Prakash's answer is for Struts 1). Note that not all validations are supported on the client side out-of-the-box.
Whose rules are you playing by? This tiny ad doesn't respect those rules: