jisjian 2年前

修改理由:

数据表和字段复数错误

详细描述:

官方文档:learnku.com/docs/laravel/9.x/valid...
If the column option is not specified, the field name will be used. So, in this case, the rule will validate that the states database table contains a record with a state column value matching the request's state attribute value.

相关信息:


此投稿由 MArtian 2年前 合并。

标题修改:

+ 表单验证

内容修改:

红色背景 为原始内容

绿色背景 为新增或者修改的内容

OldNewDifferences
11521152
11531153   'state' => 'exists:states'
11541154
1155 如果未指定 `column` 选项,则将使用字段名称。因此,在这种情况下,该规则将验证 `states` 数据库表是否包含一条记录,该记录的 `states` 列的值与请求的 `states` 属性值匹配。
 1155如果未指定 `column` 选项,则将使用字段名称。因此,在这种情况下,该规则将验证 `states` 数据库表是否包含一条记录,该记录的 `state` 列的值与请求的 `state` 属性值匹配。
11561156
11571157<a name="specifying-a-custom-column-name"></a>
11581158#### 指定自定义列名