replace 

<required-message>Customer Location must be provided</required-message>

with

<rule name="required" value="true">Customer Location must be
provided</rule>


<required-message> allows you to set the message to be displayed, if the
field turns out to be required and was not filled in.  Whether the field
is required would be determined at runtime.  It is just a way to keep an
error message with the others that might otherwise end up in java code.

If the field is always required, use the form I showed above.

john mcnally

Everson Dave wrote:
> 
> Hi,
> 
> In my intake.xml file, I have the following business rule defined:
> 
> <field name="CustomerLocation" key="customerlocation" type="String">
>   <rule name="minLength" value="5">Customer Location must be at least 5
> characters</rule>
>   <rule name="maxLength" value="25">Customer Location must be less than 25
> characters</rule>
>   <required-message>Customer Location must be provided</required-message>
> </field>
> 
> If a user enters less than 5 or more than 25 characters, the data input is
> properly marked as invalid.  However, if the user enters NO data (i.e. empty
> string) in the field, the data is considered valid.  I am expecting the
> application to display the required-message text and mark the data as
> invalid.
> 
> Am I doing something incorrect or is there a bug somewhere in Intake
> service?
> 
> Thanks,
> Dave
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to