This rule belongs to the
custom-rules-linting ruleset and states that:
The target values being validated must be orded in an ascending or descending order depending upon the chosen scheme.
|Message||Values are out of order.|
|Broad Category||Custom Rules|
- If you are validating a list of string values, ensure that the list items are arranged in an alphabetical order for ascending order cases.
- If you are validating a list of numeric values, ensure that the list items are arranged in an increasing order for ascending cases and decreasing order for descending cases.
- If you are validating an object, ensure that the object keys are arranged in an alphabetical order for ascending order cases.
- Ensure that you have configured the rule sorting scheme correctly i.e. the
Ascendingargument is set as
falseif the target values are expected to be ordered in a descending manner.