Class RepeaterDistributionValidator

All Implemented Interfaces:
ContentValidator, Configurable, LogEnabled, Serviceable

This implementation of ContentValidator validates the content by checking the distribution of weights in a repeater. For each entry of repeater, check if the sum of the 'weight' values is equal or lower than 100. The repater can be linked to a percentage attribute. If the percentage attribute is set to false, the validation is skipped (means that weights are not expressed as a percentage). The repeater and weights are identified in validator's configuration by the attribute path as follows: <repeater path="path/to/repeater" weightAttribute="weight"/> The validator can validate multiple weight attributes in the same repeater. To do so, multiple <attribute path="path/to/weight"/> can be defined inside the validator configuration. The percentage attribute is identified in validator's configuration by the attribute path as follows: <percentage path="path/to/attribute/percentage"/>