We have used struts 2 validation with lots of custom validation to validate our
forms.
@Validations(
customValidators =
{ @CustomValidator(type = "AccountFormat", fieldName =
"accountNo") }
)
Also we can can manually validate a form by overriding the validate method
public void validate(){
//Username can't be blank
if(username.equals("")){
addFieldError("username", "The Username can't be empty");
}
Is it possible to call the `custom validations` in the `validate()`.
**Why we need it ?!**
All validation rules are packed in custom validations, which is perfect. There
are some few forms which need to have their own manual validation. We end up
cut and pasting some of custom validation rules in these manual validation
forms too, it would be best if we could call validations here
~Regards,
~~Alireza Fattahi