IT WORKS , but im not getting the error sent by the validator
On 5/5/05, Niall Pemberton <[EMAIL PROTECTED]> wrote:
> As I said the method signatures don't match - you're missing the "Validator"
> parameter. Change your config file to the following:
>
> <validator name="licencia"
> classname="validator.ValidatorLicenciaMaestro"
> method="validateLicenciaMaestro"
> methodParams="java.lang.Object,
> org.apache.commons.validator.ValidatorAction,
> org.apache.commons.validator.Field,
> org.apache.struts.action.ActionMessages,
> org.apache.commons.validator.Validator,
> javax.servlet.http.HttpServletRequest"
> depends=""
> msg="errors.licencia"/>
>
> Niall
>
> ----- Original Message -----
> From: "Metal KoRn" <[EMAIL PROTECTED]>
> Sent: Friday, May 06, 2005 2:50 AM
>
> This is the code for the validator form
>
> public class ValidatorLicenciaMaestro implements Serializable{
>
> public static boolean validateLicenciaMaestro(Object
> bean,ValidatorAction va, Field field,ActionMessages
> errors,org.apache.commons.validator.Validator
> validator,HttpServletRequest request) {
>
> String value = null;
> if (isString(bean)) {
> value = (String) bean;
> } else {
> value = ValidatorUtils.getValueAsString(bean,
> field.getProperty());
> }
>
> System.out.println("This is value for validator "+value);
>
> return false;
>
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]