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
What are you trying to achieve or the steps to reproduce ?
Trying to validate that an object only has keys from a specific set. However the set is dynamic. The valid function works if just using a static list i.e ['coding', 'reviewing'].
"coding" should be allowed it is in the strengthNames array.
context of the error should also contatin valids: [ array ]
type of error should be 'any.allowOnly'
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
lockbot
locked as resolved and limited conversation to collaborators
Jan 9, 2020
Context
What are you trying to achieve or the steps to reproduce ?
Trying to validate that an object only has keys from a specific set. However the set is dynamic. The valid function works if just using a static list i.e ['coding', 'reviewing'].
Which result you had ?
{
message: '"coding" is not allowed',
path: [ 'Strengths', 'coding' ],
type: 'object.allowUnknown',
context: { child: 'coding', value: 3, key: 'coding', label: 'coding' }
}
What did you expect ?
"coding" should be allowed it is in the strengthNames array.
context of the error should also contatin valids: [ array ]
type of error should be 'any.allowOnly'
The text was updated successfully, but these errors were encountered: