In this provided example:
{
"default": "adsds",
"max": 1
}
I attempted to reference the dynamically provided 'max' value and validate the number of characters entered in the 'default' field. To achieve this, I created a schema as follows:
{
"type": "object",
"properties": {
"max": {
"type": "integer"
},
"default": {
"type": "string",
"maxLength": {
"$data": "1/max"
}
}
}
}
However, this approach did not work and an error was triggered in the console stating,
ERROR Error: schema is invalid: data/properties/default/maxLength must be integerPlease visit the following link to investigate the mentioned issue.
https://codesandbox.io/s/beautiful-frog-2hrlch?file=/src/app/app.component.tsVersions: "ajv": "^8.12.0", "ajv-errors": "^3.0.0", "ajv-keywords": "^5.1.0",
I have exhausted all options but it still does not work