You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When adding a CSV-field we currently can't prevent empty fields. Even if we set 'not-null' to true, it's still possible to create empty entries.
This happens for csv (=text) as well as json (=array) fields.
To Reproduce
create a field test as csv, do not allow null-values, default-value is automatically set to null
Create an entry with a value
delete the value & save again
--> it's inserted as "empty" instead of null and therewith valid
Even with custom validations it seems not to be possible to prevent empty json / csv.
For json it's somehow related to #7277 but as csv are stored as strings I'd expect it to work
Directus Version
10.12.1
Hosting Strategy
Self-Hosted (Docker Image)
Database
Postgres
The text was updated successfully, but these errors were encountered:
Hmm yeah. Empty and null are technically two different things, but this is indeed a bit confusing. In case of a csv, the _nempty validation operation should prevent it from being an empty string though. For JSON there's currently no "length" for arrays indeed
Describe the Bug
When adding a CSV-field we currently can't prevent empty fields. Even if we set 'not-null' to true, it's still possible to create empty entries.
This happens for csv (=text) as well as json (=array) fields.
To Reproduce
test
as csv, do not allow null-values, default-value is automatically set to nullEven with custom validations it seems not to be possible to prevent empty json / csv.
For json it's somehow related to #7277 but as csv are stored as strings I'd expect it to work
Directus Version
10.12.1
Hosting Strategy
Self-Hosted (Docker Image)
Database
Postgres
The text was updated successfully, but these errors were encountered: