the required-message element only provides for giving the message that
will be displayed IF the field is required. It is not generally known
up front whether a field is required, this mechanism allows one to
specify the message in the same location as other error messages, but it
is still up to the Action to determine whether the field was required.
It can then set it with Field.setRequired(true) before checking the
input validity.
I do not know what version you are using, but I recently (last week)
made a large change to intake to make it easier to add custom
validators. In this change I added a
<rule name="required" value="true">Some error message</rule>
in the event the field would always be required. I do not know if jason
ported this to the tdk2.1b2 branch, but regardless it requires a bug fix
that I only have locally until I can get it checked in.
john mcnally
James Coltman wrote:
>
> When using Intake how do you specify in the XML that a field is required. I
> tried just adding a required-message element but it seems to think that it
> is a valid submission when I don't type anything into the form field.
>
> Has anyone done this yet?
>
> James
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]