> -----Original Message-----
> From: Fred Lamuette [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, September 25, 2003 1:58 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [OS-webwork] Validation Framework details
> 
> 
> You have a model class in your action to populate, one of the 
> property is a java.util.Date. You register your own 
> DateConverter (for i18n purpose ...) When WW2 populates the 
> Action after a form submission, you have 2 cases : 1/ The 
> string represent a date, and the converter can parse it and 
> store it in the model class. No pb. 2/ The string doesn't 
> represent a date, your converter surely returns a NULL value. 
> The date property in the model class is set to NULL. You can 
> always validate that the property MUST be not null, but the 
> main aim is to warn the user it is an invalid date.
> 
> So my question is : if validation triggers after populating 
> the model class, how can you validate an input parameter is 
> not in a bad format ?
> 
> Cheers.
> Richard

Ahh... Good question... I guess you don't want to see 2 messages? 2
messages might be ok:

Your text "Foo Bar" could not be parsed as a date
You must enter a date for birthday


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Opensymphony-webwork mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork

Reply via email to