You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{valid: false,errors:
[{attribute: 'additionalProperties',property: '0',expected: undefined,actual: 'h',message: 'must not exist'},{attribute: 'additionalProperties',property: '1',expected: undefined,actual: 'i',message: 'must not exist'}]}
If we expect it to have the same behavior of the array validation, it should be returning something like:
{valid: false,errors:
[{attribute: 'type',property: '',expected: 'object',actual: 'array',// or "number", or "string"message: 'must be of object type'}]}
The text was updated successfully, but these errors were encountered:
Revalidator
type
check on the root object only works if the type to be validated is an array, but it doesn't work if it's an object.If
schema.type
isarray
and the value passed is an object:Revalidator returns an error:
I expected the same behavior to happen when
schema.type
isobject
, but it doesn't work. See the examples:Example 1:
returns
Example 2:
returns
Example 3:
returns
If we expect it to have the same behavior of the array validation, it should be returning something like:
The text was updated successfully, but these errors were encountered: