<required-message> allows you to specify the message that will be shown, if field.setRequired(true) is set and the field is not set. It just allows you to keep your messages in the one location, instead of having some messages in the action or bo.. It is useful if the field is not always required.
<rule name="required" ... makes the field always required. john mcnally Stephane Bailliez wrote: > > I'm confused about the correct way to define a required field in Intake. > > I can't understand the purpose of <required-message> compared with <rule > name='required' value='true'> > I quickly looked in the source but can hardly find the logic behind > 'required-message' as the required flag does not seem to be set w/ required > message but rather would need to be set (from the template ?) and it's quite > hard to follow the flag logic in Field > > In any case it works by setting a 'required' rule but not using a > 'required-message' element. > > Can someone enlighten me a little bit about this ? > > Thanks > > Stephane > > -- > 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]>
