Hi all,
I wrote my first program using validators.The validation is not kicking in.What should I do? My program is as follow.
struts-config.xml:
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property
property="pathnames"
value="/org/apache/struts/validator/validator-rules.xml,
/WEB-INF/validation.xml"/>
</plug-in>
validation.xml :
<form name="UserRegistrationForm">
<field property="lastName" depends="required">
<arg key="UserRegistrationForm.lastName" />
</field>
</form>
UserRegistrationForm:
import org.apache.struts.validator.*;
public class UserRegistrationForm extends ValidatorForm{
private
String firstName;
private String lastName;
// some getter and setters here
and I removed the validate method here in this form.
What else I should do to work the validation.what is that validation-rules.xml?I didn't see that in my directory structure. please explain.
Thanks,
sudha.