Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

验证器8.1无法使用提示信息的问题 #3126

Closed
ken678 opened this issue Mar 5, 2025 · 1 comment
Closed

验证器8.1无法使用提示信息的问题 #3126

ken678 opened this issue Mar 5, 2025 · 1 comment
Labels

Comments

@ken678
Copy link
Contributor

ken678 commented Mar 5, 2025

所属功能组件

其它

ThinkPHP 版本

8.1

操作系统

windows

错误信息

$data      = $this->request->post();
$rule      = [
    'verify|验证码'   => 'require|captcha',
    'username|用户名' => 'require|alphaDash|length:3,20',
     'password|密码'  => 'require|length:3,20',
     '__token__'    => 'require|token',
];

try {
    $this->validate($data, $rule);
} catch (ValidateException $e) {
    // 验证失败 输出错误信息
    $this->error($e->getError());
}

8.0提示验证码不得为空
8.1之后变成verify不得为空

其它说明

No response

@ken678 ken678 added the bug label Mar 5, 2025
@big-dream
Copy link
Contributor

验证器(Validate)功能请前往 https://github.com/top-think/think-validate/issues 反馈

@ken678 ken678 changed the title 验证器8.1有问题了 验证器8.1的问题 Mar 5, 2025
@ken678 ken678 changed the title 验证器8.1的问题 验证器8.1无法使用提示信息的问题 Mar 5, 2025
@liu21st liu21st closed this as completed Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants