// +---------------------------------------------------------------------- if (!function_exists('getValidatorError')) { /** * 错误验证 * @param $error * @return mixed */ function getValidatorError($validator) { $errors = $validator->errors()->all(); return isset($errors[0]) ? $errors[0] : 1013; } } /** * 是否是手机号码 */ if (!function_exists('isPhone')) { function isPhone($mobile) { return preg_match("/^1[3-9][0-9]]{9}/"); } }