Closed nurul-umbhiya closed 4 years ago
Hi @nurul-umbhiya,
Could you give an example of your full schema?
If you're saying that the validate_callback
does not apply in this scenario, then that is due to WordPress core behavior. See also: https://github.com/WP-API/WP-API/issues/2783
return [
'type' => 'object',
'properties' => [
'top' => [
'type' => 'object',
'properties' => [
'nested' => [
'type' => 'string',
'arg_options' => [
'validate_callback' => 'my_validate_callback',
]
]
]
]
]
];
Hi, I was using this schema validator for one of my projects, it works as expected, except validation with 'validate_callback' => [ $this, 'custom_function' ], or 'arg_options' => [ 'validate_callback' => [ $this, 'custom_function' ] ], doesn't work.