| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- // +----------------------------------------------------------------------
- // | LARAVEL8.0 框架 [ LARAVEL ][ RXThinkCMF ]
- // +----------------------------------------------------------------------
- // | 版权所有 2017~2021 LARAVEL研发中心
- // +----------------------------------------------------------------------
- // | 官方网站: http://www.laravel.cn
- // +----------------------------------------------------------------------
- // | Author: laravel开发员 <laravel.qq.com>
- // +----------------------------------------------------------------------
- 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}/");
- }
- }
|