@metreeca/core - v0.9.22
    Preparing search index...

    Function values

    • Requires values to be present in an array or object.

      Checks the array elements or the object property values as a whole for the presence of each required value, so membership is stated the same way for either.

      Every missing value is reported together in a single message.

      Type Parameters

      • V extends string | number

        The type of the required values

      Parameters

      • values: readonly V[] | undefined

        The values the array or object must contain, or undefined to accept either unconditionally

      Returns Validator<readonly unknown[] | Record<string, unknown>>

      A validator reporting a violation listing every required value missing