commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Selvakumar Loganathan <se...@dcis.net>
Subject Re: Minimum Length validation
Date Mon, 21 Jan 2008 13:17:32 GMT
Beejal, 

The minLength(String value, int n) only checks if a value is greater than or equal to the
min.

so you could be doing something like 

org.apache.commons.validator.GenericValidator.minLength(org.apache.commons.validator.Field,
4) 
where it would return "true" if the Field value is equal to or more than 4 or "false" if the
value is below 4. 

Thanks,
Selva. 




Beejal wrote:
> validateRequired, validateEmail and validateInt all are working fine.
> Only GenericValidator.minLength is giving problems.
> The error message shown is:
>
> Exception in thread "main" org.apache.commons.validator.ValidatorException:
> No such validation method:
> org.apache.commons.validator.GenericValidator.minLength(java.lang.Object,
> org.apache.commons.validator.Field)
>
>
> -----Original Message-----
> From: HIMANSHU MALL [mailto:Himanshu.Mall@hcl.in] 
> Sent: Monday, January 21, 2008 5:36 PM
> To: Beejal
> Subject: RE: Minimum Length validation
>
>
> If you are talking about Struts Validator framework, Find the attached
> page and go through it.
>
>
>
> -----Original Message-----
> From: Beejal [mailto:beejal.kamdar@patni.com] 
> Sent: Monday, January 21, 2008 5:25 PM
> To: user@commons.apache.org
> Subject: FW: Minimum Length validation
>
>  
>
>  
>
>   _____  
>
> From: Beejal [mailto:beejal.kamdar@patni.com] 
> Sent: Monday, January 21, 2008 5:24 PM
> To: 'user@commons.apache.org'
> Subject: Minimum Length validation
>
>  
>
> Hi All,
>
>  
>
> I would like to know how can I do the minimum length validation for a
> field
> using minLength(String value, int n) method of the GenericValidator.java
>
> Thanks
>
>  
>
> Regards,
>
> Beejal
>
>
> http://www.patni.com
> World-Wide Partnerships. World-Class Solutions.
> _____________________________________________________________________
>
> This e-mail message may contain proprietary, confidential or legally
> privileged information for the sole use of the person or entity to
> whom this message was originally addressed. Any review, e-transmission
> dissemination or other use of or taking of any action in reliance upon
> this information by persons or entities other than the intended
> recipient is prohibited. If you have received this e-mail in error
> kindly delete  this e-mail from your records. If it appears that this
> mail has been forwarded to you without proper authority, please notify
> us immediately at netadmin@patni.com and delete this mail. 
> _____________________________________________________________________
>
>
> DISCLAIMER:
> ----------------------------------------------------------------------------
> -------------------------------------------
>
> The contents of this e-mail and any attachment(s) are confidential and
> intended for the named recipient(s) only. 
> It shall not attach any liability on the originator or HCL or its
> affiliates. Any views or opinions presented in 
> this email are solely those of the author and may not necessarily reflect
> the opinions of HCL or its affiliates. 
> Any form of reproduction, dissemination, copying, disclosure, modification,
> distribution and / or publication of 
> this message without the prior written consent of the author of this e-mail
> is strictly prohibited. If you have 
> received this email in error please delete it and notify the sender
> immediately. Before opening any mail and 
> attachments please check them for viruses and defect.
>
> ----------------------------------------------------------------------------
> -------------------------------------------
>
>
>
> http://www.patni.com
> World-Wide Partnerships. World-Class Solutions.
> _____________________________________________________________________
>
> This e-mail message may contain proprietary, confidential or legally
> privileged information for the sole use of the person or entity to
> whom this message was originally addressed. Any review, e-transmission
> dissemination or other use of or taking of any action in reliance upon
> this information by persons or entities other than the intended
> recipient is prohibited. If you have received this e-mail in error
> kindly delete  this e-mail from your records. If it appears that this
> mail has been forwarded to you without proper authority, please notify
> us immediately at netadmin@patni.com and delete this mail. 
> _____________________________________________________________________
>
>   
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message