Share via


FormDataObject.mandatory Method

Sets or returns a value that indicates whether the data field is mandatory.

Syntax

public boolean mandatory([boolean value])

Run On

Client

Parameters

  • value
    Type: boolean
    The value to assign to the mandatory property of the field.

Return Value

Type: boolean
true if the field is mandatory; otherwise, false.

Examples

The following example shows how to retrieve and set the mandatory property for the field.

// Return the value of the mandatory property. 
info (strfmt("mandatory: %1", fdo.mandatory())); 
// Set the value of the mandatory property. 
fdo.mandatory(false);

See Also

FormDataObject Class

Best Practices for Table Field Properties