> the two elements have different purposes.  The second one is useful to
> keep your error messages in a single location, but it does not mark a
> field as required.  If field.setRequired(true) is called and the field
> was not set, then the message given in the <required-message> tag will
> be shown.

I don't quite understand...do you mean it's like a default-message that
stores the error message for any of the rules that don't have their own
error message?

So, I was trying:

<field name="StopDate" key="stopdate" type="Date">
  <rule name="format" value="MM/dd/yyyy hh:mm"/>
  <rule name="format1" value="MM/yyyy"/>
  <rule name="flexible" value="true"/>
  <rule name="required" value="true"/>
  <required-message>The stop date is invalid.</required-message>
</field>

But if the field is left blank, no message is shown (though isAllValid
is still true as it should be). If the date is a bad string, then "Date
could not be parsed" is shown as the message.

The default-message behavior would be cool, but doesn't seem to be
working...am I misinterpreting what you said?

Thanks,
Stephen

> 
> The first rule marks the field as always required.
> 
> john mcnally
> 
> On Wed, 2002-06-26 at 15:19, Stephen Haberman wrote:
> > With Fulcrum 3.0-b2 intake, I can do:
> >
> > <rule name="required" value="true">this is required</rule>
> >
> > And it works great, but:
> >
> > <required-message>this is required</required-message>
> >
> > doesn't work. However, the source seems to at least try to handle
the
> > required-message. Is the required-message moved away from in favor
of
> > the first rule?
> >
> > If so, I think that's great, but can either the docs or the DTD be
> > updated? How about an intake-3.0.dtd so that Turbine 2.x users will
be
> > okay, but the required-message, Date/DateString changes could be
> > reflected.
> >
> > Thanks,
> > Stephen
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
> >
> 
> 
> 
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to