8000 thikphp6如何使用验证器验证两个字段的唯一性? · Issue #1144 · top-think/think · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
10000
thikphp6如何使用验证器验证两个字段的唯一性? #1144
Open
@mkinit

Description

@mkinit

请问thikphp6如何使用验证器验证两个字段的唯一性,有个收藏表,字段:user_id、post_id,在mysql中是可以同时约束的,但验证器不知道怎么写,官方文档有示例,但看不懂,不知道怎么传参。
// 多个字段验证唯一验证条件
'name' => 'unique:user,status^account',

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0