directus/v6-archive

Mandatory Field allowing null values

Aberta

#28 aberto em 25 de out. de 2018

 (0 comentário) (0 reação) (0 responsável)JavaScript (4 forks)auto 404
help wantedv6

Métricas do repositório

Stars
 (2 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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.

Guia do colaborador