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
Change unique to accept the same args: either a comparator function; or a string and an optional "options" object. @types/joi can help us work out what the arg types should be. Then update the interface ArraySchemaModifiers, and add tests.
I have the same problem as in https://stackoverflow.com/questions/53243306/validating-unique-key-pairs-in-a-nested-object-with-joi-and-nodejs
I essentially have an array of objects, and I want to validate that a certain key/value pair is not duplicated amongst the array elements of objects.
This can be solved in
joi
with providing a comparator to theunique()
function.However, in
joiful
, I cannot pass a comparator tounique()
.Is there a different way to do this?
The text was updated successfully, but these errors were encountered: