Mendix Client 4 API Documentation


mendix.lib.ObjectValidation

mendix.lib.ObjectValidation contains the messages of a failed MxObject validation. The terms fields and attributes are used interchangeably, so some methods have aliases reflecting this.

Methods

getGUID()

Returns GUID of the validated MxObject.

getFields(), getAttributes()

Returns attributes which did not pass validation.

Return values

An array of Objects with the following contents:

Key Type Description
name String The attribute that did not pass validation.
reason String A description of the reason why the validation did not pass.

addField(attr, message), addAttribute(attr, message)

Add validation message message for attribute attr if there isn’t one. Returns true if there is no message for attr, false otherwise.

removeField(attr), removeAttribute(attr)

Remove the validation message of attribute attr. Returns false if there is no message for attr, true otherwise.

getErrorReason(attr)

Returns the validation message of attr.

clone()

Returns a clone of this ObjectValidation object.

toString()

Returns the string representation of this ObjectValidation object.