new RuleList()

Creates a new rule list instance.

Methods

add(id, rule)

Adds a new rule to the list of rules of its owner property.

Parameters

Name Type Optional Description

id

string

 

The identifier of the rule list, typically the property name.

rule

(bo.rules.ValidationRule or bo.rules.AuthorizationRule)

 

A validation or authorization rule.

Throws

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

Argument error: The rule must be a ValidationRule or AuthorizationRule object.

sort()

Sorts the lists of rules by rule priority.