fix: Array Unique wrong validation for nullable values #2498
Labels
status: needs triage
Issues which needs to be reproduced to be verified report.
type: fix
Issues describing a broken feature.
Description
Hey guys. I was trying to validate some data and I found a different behavior from the decorator
ArrayUnique
. According to the docs,If null or undefined is given then this function returns false.
, but this is not what is happening. The function returns true.Minimal code-snippet showcasing the problem
Click here for Sandbox
The code is in the
example.ts
file in thesrc
directory.Expected behavior
The validation should not return any errors.
Actual behavior
The
ArrayUnique
decorator is not validatingnull
orundefined
duplicated values. These values should be ignored and the function should returnfalse
, but it is returningtrue
.The text was updated successfully, but these errors were encountered: