Validate CIDR type IP input