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.
The code is in the example.ts file in the src directory.
Expected behavior
The validation should not return any errors.
Actual behavior
The ArrayUnique decorator is not validating null or undefined duplicated values. These values should be ignored and the function should return false, but it is returning true.
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
.