indicative-compiler › compiler/main
- ArrayWrapper
- ConsumerFn
- ErrorCollectorFn
- SanitizationDataRoot
- SanitizationDefination
- SanitizationDefinition
- SanitizeFunction
- ValidateFunction
- ValidationDataRoot
- ValidationDefination
- ValidationDefinition
Ƭ ArrayWrapper: function
Array wrapper to wrap children nodes of inside a wildcard or indexed array
▸ (index
: string, field
: string, children
: T | U[], dotPath
: string[]): U
Parameters:
Name | Type |
---|---|
index |
string |
field |
string |
children |
T | U[] |
dotPath |
string[] |
Ƭ ConsumerFn: function
Tree node consumer called by the TreeWalker
▸ (field
: string, type
: "literal" | "object" | "array", rules
: ParsedRule[], dotPath
: string[], pointer
: string): T
Parameters:
Name | Type |
---|---|
field |
string |
type |
"literal" | "object" | "array" |
rules |
ParsedRule[] |
dotPath |
string[] |
pointer |
string |
Ƭ ErrorCollectorFn: function
A custom error collector that works as a bridge between the validator and the formatter.
▸ (formatter
: ErrorFormatterContract, message
: string | Error, field
: string, rule
: string, args
: Array): void
Parameters:
Name | Type |
---|---|
formatter |
ErrorFormatterContract |
message |
string | Error |
field |
string |
rule |
string |
args |
Array |
Ƭ SanitizationDataRoot: Omit‹ValidationDataRoot, "pointer" | "arrayPointer"›
Shape of sanitizer data root.
Ƭ SanitizationDefination: SanitizationDefinition
Ƭ SanitizationDefinition: object
Shape of sanitization definition
Ƭ SanitizeFunction: function
Shape of sanitization function.
▸ (data
: SanitizationDataRoot, field
: string, args
: any[], config
: unknown): void
Parameters:
Name | Type |
---|---|
data |
SanitizationDataRoot |
field |
string |
args |
any[] |
config |
unknown |
Ƭ ValidateFunction: function
Shape of validation function
▸ (data
: ValidationDataRoot, field
: string, args
: any[], config
: unknown): boolean | Promise‹boolean›
Parameters:
Name | Type |
---|---|
data |
ValidationDataRoot |
field |
string |
args |
any[] |
config |
unknown |
Ƭ ValidationDataRoot: object
The data object passed to all validation functions.
Ƭ ValidationDefination: ValidationDefinition
Ƭ ValidationDefinition: object
Shape of validation defination