Attributes

Description

required

Automatic/Required

Set to true or false.

Usage Notes

The Required converter requires a user to populate a form field before the form can be processed. This converter only affects the corresponding property’s setX operation. You can use it in the following form tags:

dsp:input
dsp:select
dsp:postfield
dsp:textarea

If the value in a required field is an empty string or contains white space, a DropletFormException for this element is thrown.

For example, the following input tag creates a form exception if the user submits the form with a null or empty value in this field:

<dsp:input type="text" bean="Person.userName" required="true"/>

Note: Other tag converters such as date and number can specify required as an optional attribute. For example, this tag specifies a date format, and makes the field required:

<dsp:input bean="NewUser.lastActivityDate" date="MMM d, yyyy" required="true"/>


Copyright © 1997, 2017 Oracle and/or its affiliates. All rights reserved. Legal Notices