32 || strlen($texture_name) < 1) { throw new E('无效的材质名称。材质名长度应该小于 32。', 2); } else if (Utils::convertString($texture_name) != $texture_name) { throw new E('无效的材质名称。材质名称中包含了奇怪的字符。', 2); } return true; } public static function password($password, $silent = false) { if (strlen($password) > 16 || strlen($password) < 8) { if ($silent) return false; throw new E('无效的密码。密码长度应该大于 8 并小于 16。', 2); } else if (Utils::convertString($password) != $password) { if ($silent) return false; throw new E('无效的密码。密码中包含了奇怪的字符。', 2); } return true; } }