validators: add NETMASK_OR_EMPTY validator. Refs #1752