Open deepesh0102 opened 3 years ago
Try something like this
var rules = { status_array: "array", "status_array.*": "boolean" }
On Thu, 3 Dec 2020, 15:10 Deepesh Kumar, notifications@github.com wrote:
I have an array of boolean. How to validate. var data = { status_array: [true, false, true, false] }
var rules = { "status_array": "array|in:true,false", }
Please Help How to validate this type of array.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/skaterdav85/validatorjs/issues/395, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4YEY3YOZDWFUJVJEXUSULSS5MIBANCNFSM4ULWXU7A .
I have an array of boolean.
How to validate. var data = { status_array: [true, false, true, false] }
var rules = { "status_array": "array|in:true,false", }
Please Help How to validate this type of array.