Hi,

I'm trying to create a new Validation Rule, but couldn't figure out how to
get the field value back as an Object instead of a String.

I created the validation method as:

public static boolean validateImageInfo(
     Object bean,
     ValidatorAction va,
     Field field,
     ActionErrors errors,
     HttpServletRequest request,
     ServletContext application) {

     String value = ValidatorUtils.getValueAsString(bean, field.getProperty
());

     ....

 }

but what I really what is getting an Object back (FormFile), instead of
String. I went through the org.apache.commons.validator.*, but couldn't
find any method that accomplishes this. Anyone has any idea? Is this even
possible?

Thanks,

Changyi


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to