Previous Topic: detailReportValidation( field, has_error, emsg )

Next Topic: detailRowHdr( hdrtext, colspan, is_required )


detailSetValidate( hdrtext, is_required, maxsize )

This function specifies that the most recent field created with an ID supplied by detailNextID() is subject to browser-side validation. Validation for required fields and for fields with a maximum size is automatic. Other forms of validation may be provided through JavaScript functions or event handlers calling detailReportValidation().

You should call detailSetValidate() only for form fields you have defined yourself whose ID was created by detailNextID(). The detailSetValidate() function must be called immediately after creating a field that you want validated. It is unnecessary (and will caused unexpected results) to call detailSetValidate() for fields created by detail form macros.

hdrtext

(Required) Specifies a string used to identify the field in error messages.

is_required

(Required) A Boolean or integer value specifying whether the field is required. CA SDM automatically verifies that all required fields are provided whenever the user attempts to save a record.

maxsize

An integer specifying the maximum length of data allowed for the field. CA SDM automatically verifies that all fields with a maxsize value have a length within limits whenever the user attempts to save a record. This argument is required. To suppress maxsize validation, specify a value of 0.