Whether a non-empty value is required for this field to pass validation.
If the user does not fill in the required
field, the error message to be shown will be taken from these properties in the following order:
com.smartgwt.client.widgets.form.fields.FormItem#getRequiredMessage,
com.smartgwt.client.widgets.form.DynamicForm#getRequiredMessage,
com.smartgwt.client.data.DataSource#getRequiredMessage,
com.smartgwt.client.widgets.form.validator.Validator#requiredField.
Note: if specified on a
FormItem, required
is only enforced on the client. required
should generally be specified on
a
com.smartgwt.client.data.DataSourceField.
Setter to mark this formItem as
com.smartgwt.client.widgets.form.fields.FormItem#getRequired, or not required at runtime. Note that an alternative approach to updating the required
flag directly would be to simply use a
com.smartgwt.client.types.ValidatorType type validator.
Note thate this method will not re-validate this item by default or clear any existing validation errors. If desired, this may be achieved by calling
com.smartgwt.client.widgets.form.fields.FormItem#validate or
com.smartgwt.client.widgets.form.DynamicForm#clearErrors.