Function validateEntry

  • Validates data entry with a typeof check and potentially tests against the values in any given expected set.

    Parameters

    • data: object

      The object data to validate.

    • accessor: string

      A string describing the entries to access.

    • entry: ValidationEntry

      Validation entry.

    • OptionaldataName: string

      Optional name of data.

    Returns boolean

    True if validation passes otherwise an exception is thrown.