I have a widget defined with a base datatype of date. I have the calendar pop-up attached so that the user can enter dates easily.
However, if the users types in a date by hand, and gets it wrong, the rather unhelpful error message is:
datatype.conversion faileddatatype.date
Fine for developers whilst writing the application but ...
This should be handled by i18n. When I try the flow sample I get a message "Not a valid date."
Even worse, if the user types in nothing (on a freshly added row), the form accepts this without complaint (I'm not quite sure why this should be - I have a pattern convertor and the empty string doesn't match the pattern - well, I don't think it does:
If you do not enter anything no convertor is asked. That's an expected behaviour. If you want to make a required field, add required="true". If the behaviour were like you expect it, it would not be possible to leave out a date field.
Anyway, clearly I need a validator so I can give appropriate error messages. Looking at the documentation, there does not appear to be one available for date fields. Does that mean I have to write one in javascript (or will I need to use java?)?
No, required="true", the convertor with a pattern and an i18n message should be sufficient.
Joerg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
