You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Heidy Gutiérrez Guzmán <he...@gmail.com> on 2006/09/13 15:13:05 UTC

Problems with validator framework

Hi

I need to validate a form with fields wich data type is "int" and "float"

The validation that i use is "required", but that doesn't work.

The fields are initilialized with default values (o for int types) and
(0.0for float types).

Whit string data types, validator works fine.

If somebody would help me, i would be grateful

RE: Problems with validator framework

Posted by "Strachan, Paul" <Pa...@det.nsw.edu.au>.
what I would do is:
1. keep form properties as String (and consider using DynaValidatorForm)
2. use the "required,float" or "required,int" validation
3. use BeanUtils.populate method to map the form onto a typed object (property names must match)

________________________________

From: Heidy Gutiérrez Guzmán [mailto:heidyguti@gmail.com]
Sent: Wed 13/09/2006 11:13 PM
To: user@struts.apache.org
Subject: Problems with validator framework



Hi

I need to validate a form with fields wich data type is "int" and "float"

The validation that i use is "required", but that doesn't work.

The fields are initilialized with default values (o for int types) and
(0.0for float types).

Whit string data types, validator works fine.

If somebody would help me, i would be grateful


**********************************************************************
This message is intended for the addressee named and may contain
privileged information or confidential information or both. If you
are not the intended recipient please delete it and notify the sender.
**********************************************************************

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