You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Colin Paul Adams <co...@colina.demon.co.uk> on 2004/07/02 07:56:38 UTC
Validation of time fields in CForms
I have the following in my form definition file:
<fd:field id="start-time">
<fd:label>Start time</fd:label>
<fd:datatype base="date">
<fd:convertor datatype="date" variant="time" type="formatting">
<fd:patterns>
<fd:pattern>kk:mm</fd:pattern>
</fd:patterns>
</fd:convertor>
</fd:datatype>
</fd:field>
Validation works fine, but the validation error message reported to
the user (using the forms samples message calatalogue) is:
Not a valid date.
In the messages catalogue, there is a key datatype.date.
Since I also have date fields, changing this message cannot give me
satisfactory results.
Is it possible to have messages keyed to the variant level
(datatype.date.date and datatype.date.time perhaps)?
--
Colin Paul Adams
Preston Lancashire
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Validation of time fields in CForms
Posted by Colin Paul Adams <co...@colina.demon.co.uk>.
>>>>> "Joerg" == Joerg Heinicke <jo...@gmx.de> writes:
Joerg> This time variant becomes more and more nasty - maybe we
Joerg> should easily drop it completely :-p Can you collect all
Please don't. proper support for it would be a better approach.
:-)
Joerg> issues for the variant handling in a bug report?
Bug #29881 entered.
--
Colin Paul Adams
Preston Lancashire
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Validation of time fields in CForms
Posted by Joerg Heinicke <jo...@gmx.de>.
On 02.07.2004 07:56, Colin Paul Adams wrote:
> I have the following in my form definition file:
>
> <fd:field id="start-time">
> <fd:label>Start time</fd:label>
> <fd:datatype base="date">
> <fd:convertor datatype="date" variant="time" type="formatting">
> <fd:patterns>
> <fd:pattern>kk:mm</fd:pattern>
> </fd:patterns>
> </fd:convertor>
> </fd:datatype>
> </fd:field>
>
> Validation works fine, but the validation error message reported to
> the user (using the forms samples message calatalogue) is:
>
> Not a valid date.
>
> In the messages catalogue, there is a key datatype.date.
>
> Since I also have date fields, changing this message cannot give me
> satisfactory results.
>
> Is it possible to have messages keyed to the variant level
> (datatype.date.date and datatype.date.time perhaps)?
This time variant becomes more and more nasty - maybe we should easily
drop it completely :-p Can you collect all issues for the variant
handling in a bug report?
It seems you can not even work around this problem by using
fd:failmessage as it is possible for validators (see form1 sample form
definition and fd:failmessage in it).
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org