Skip to content

Interface: ReferenceOptions

Extends

Properties

PropertyTypeDescriptionInherited from
adjust?(value: any) => anya function with the signature function(value) where value is the resolved reference value and the return value is the adjusted value to use. Note that the adjust feature will not perform any type validation on the adjusted value and it must match the value expected by the rule it is used in. Cannot be used with map. Example (value) => value + 5-
ancestor?numberIf set to a number, sets the reference relative starting point. Cannot be combined with separator prefix characters. Defaults to the reference key prefix (or 1 if none present)-
in?booleancreates an in-reference.-
iterables?booleanwhen true, the reference resolves by reaching into maps and sets.-
map?[any, any][]an array of array pairs using the format [[key, value], [key, value]] used to maps the resolved reference value to another value. If the resolved value is not in the map, it is returned as-is. Cannot be used with adjust.-
prefix?{ global?: string; local?: string; root?: string; }overrides default prefix characters.-
prefix.global?stringreferences to the globally provided context preference. Default '$'-
prefix.local?stringreferences to error-specific or rule specific context. Default '#'-
prefix.root?stringreferences to the root value being validated. Default '/'-
render?booleanwhen true, the value of the reference is used instead of its name in error messages and template rendering. Defaults to false.-
separator?string | falseoverrides the default . hierarchy separator. Set to false to treat the key as a literal value. Default '.'HierarchySeparatorOptions.separator