Skip to content
Advertisement

Possible to validate against elements in an array?

I am using validate to validate input, and I need to validate an input that has to be one of the numbers in my arr.

JavaScript

If I try enum: arr, then it takes the entire array and not just one of the elements.

Question

Is it possible to get validate to use one of the numbers from arr?

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement