const isNonEmptyStringArray = both(isNonEmptyArray, isStringArray);
isNonEmptyStringArray([""]) >>
{
valid: true,
parsed: [""],
};
isNonEmptyStringArray([]) >>
{
valid: false,
error: "Not a non empty array: []",
};
isNonEmptyStringArray([1]) >>
{
valid: false,
error: "Not an array of strings: [1]",
};
Combine two validators with a logical AND