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 checkValidPwd($passwd) { if (strlen($passwd) > 16 || strlen($passwd) < 8) { throw new E('无效的密码。密码长度应该大于 8 并小于 16。', 2); } else if (Utils::convertString($passwd) != $passwd) { throw new E('无效的密码。密码中包含了奇怪的字符。', 2); } return true; } }