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

自定义msg数组形式的无效果 #55

Open
juvenrui opened this issue Jul 18, 2022 · 0 comments
Open

自定义msg数组形式的无效果 #55

juvenrui opened this issue Jul 18, 2022 · 0 comments
Assignees

Comments

@juvenrui
Copy link

juvenrui commented Jul 18, 2022

这不知道是不是bug?

改用translates做了解决。

$v = \Inhere\Validate\Validation::make(data: [
    'title' => '',
    'name' => '',
], rules: array(
    ['title,name', 'required', 'msg' => [
        'tagId' => '标题不能为空。',
        'userId' => '姓名不能为空。',
    ]],
))->validate(
    stopOnError: !true
);
if ($v->isFail()) {
    var_dump($v->getErrors());
};

截屏2022-07-18 17 43 54

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants