Validate a CIDR prefix length, not a network address.

SolidGroundUX DocumentationSolidGroundUX
NL

fn: sgnd_validate_cidr

Purpose

Validate a CIDR prefix length, not a network address.

Arguments

  • $1 — Prefix length in decimal notation.

Returns

  • 0 for a number from 0 to 32; 1 otherwise.

Usage

  sgnd_validate_cidr 24