// +---------------------------------------------------------------------- if (!function_exists('getValidatorError')) { /** * 错误验证 * @param $error * @return mixed */ function getValidatorError($validator) { $errors = $validator->errors()->all(); return isset($errors[0]) ? $errors[0] : 1013; } }