Validator Options
The validator in this library provides customizable behavior through the options
object, which can be passed during initialization in the options
property of v.validator()
.
Available Options:
Option | Default | Description |
---|---|---|
dev | false | Enables debug mode when set to true . In debug mode, the validator logs detailed messages to the console to assist with troubleshooting. |
resultsType | "object" | Determines the structure used for storing nested validation results:"array" : Nested validation results are stored in arrays. "object" : Nested validation results are stored in objects. |
⚠️
Note: The resultsType
option has been added to support projects using multiple programming languages (not just TypeScript). It may be removed in future versions once other language versions (such as Java) are stabilized.
Recommendation: If you are working exclusively with TypeScript, we recommend using "object"
for resultsType
.