import { someTrue } from "https://deno.land/x/is_valid@v1.0.0-beta.16/composite/mod.ts";
Iteration of validators that returns true
when some validators are false
.
Examples
Example 1
Example 1
const isValidPassword = someFalse(gtLength(8), hasCapitalLetter, hasSpecialLetter, hasNumber)
isValidPassword('7letter') // true
isValidPassword('hasCapital!100') // false
Example 2
Example 2
const dangerValidation = someFalse((val: any) => val.size === 1, isNull)
// null.size will occur TypeError but skip and next
dangerValidation(null) // false