directus/v6-archive

Mandatory Field allowing null values

开放

#28 创建于 2018年10月25日

 (0 条评论) (0 个反应) (0 位负责人)JavaScript (4 个派生)auto 404
help wantedv6

仓库指标

星标
 (2 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

From directus created by danieljones97 : directus/directus#2034

When setting up a new table, I specified that the first field was mandatory, however when adding my first row to the table using Postman and the API, I could leave the first field blank and the table was still updating with the new row.

Version Info

  • Directus version and branch: 6.4.3
  • PHP version: 5.6.0
  • MySQL version: 5.5.55
  • Web server: Apache 5.5.1
  • OS name and version: macOS Sierra Version 10.12

Expected Behavior

I should receive an error stating that the first field is mandatory

Actual Behavior

The table is updated with the new row and the first field is null.

Steps to Reproduce

  1. Create a new table in directus.
  2. Add a new field and click the star next to the column to state it is required.
  3. Using Postman, hit the API endpoint without passing any data to that first field.

贡献者指南