Properties

new BrokenRulesOutput()

Creates a new broken rules output instance.

Properties

read-only
$count

Returns the count of broken rules.

read-only
$length

Returns the count of properties that have broken rules.

Methods

add(propertyName, notice)

Adds a rule notice to the response object.

Parameters

Name Type Optional Description

propertyName

string

 

The name of the property.

notice

bo.rules.RuleNotice

 

The public form of the broken rule.

Throws

Argument error: The property name must be a non-empty string.

Argument error: The notice must be a RuleNotice object.

addChild(propertyName, output)

Adds a child response object to the response object.

Parameters

Name Type Optional Description

propertyName

string

 

The name of the property.

output

bo.rules.BrokenRulesOutput

 

The response object of a child property.

Throws

Argument error: The property name must be a non-empty string.

Argument error: The output must be a BrokenRulesOutput object.

addChildren(propertyName, outputs)

Adds child response objects to the response object.

Parameters

Name Type Optional Description

propertyName

string

 

The name of the property.

outputs

Array of bo.rules.BrokenRulesOutput

 

The response objects of a child collection property.

Throws

Argument error: The property name must be a non-empty string.

Argument error: The outputs must be an array of BrokenRulesOutput objects or a single BrokenRulesOutput object.