Skip to content

fix: add validation for empty dataset name#1287

Open
Shamarvey1 wants to merge 1 commit intoopenml:developfrom
Shamarvey1:fix-empty-dataset-name
Open

fix: add validation for empty dataset name#1287
Shamarvey1 wants to merge 1 commit intoopenml:developfrom
Shamarvey1:fix-empty-dataset-name

Conversation

@Shamarvey1
Copy link
Copy Markdown

Fix: Missing error message on blank dataset name (#1191)

Problem

Currently, it is possible to upload a dataset without providing a name. Since the dataset name is a mandatory field, this leads to invalid dataset entries.

Solution

Added validation in the data_upload() function to check if the dataset name is empty using empty(trim($name)).

Changes

  • Added validation for dataset name
  • Returns API error when dataset name is missing

Expected Behavior

  • Empty dataset name → error is returned
  • Valid dataset name → upload proceeds normally

Notes

This ensures backend validation even if frontend validation is bypassed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant