Validation

Applies to: general

Validation checks that input satisfies required rules before the rest of the program trusts it.

if radius <= 0:
    raise ValueError("radius must be positive")

See also: parsing, exception