Adds number validation rule.