Skip to contents

This function verifies if a given value lies within a specified range and matches the expected type, if provided.

Usage

qc_check_range(field_value, min, max, expected_type = NULL)

Arguments

field_value

The value to be checked.

min

Minimum allowable value for field_value.

max

Maximum allowable value for field_value.

expected_type

(optional) The expected type of the field_value. Default is NULL.

Value

The original field_value if it's within range and matches the expected_type; otherwise, an error is raised.