validateWithin

Validates that value is in given interval.

void
validateWithin
(
const char[2] bounds
V
)
(,,
V to
,
lazy string msg = "must be within %c%s, %s%c"
)
if (
bounds[0].among('(', '[') &&
bounds[1].among(')', ']')
)

Parameters

value V

Value to be validated

msg string

Error details in case of failure

Throws

darg_plus.exception.ValidationError if value is less than or equal to zero.

See Also

validate

Meta