This could be moved to salt.utils.validate.net.