ckan / ckan/ckanext-scheming

Losing field data with validation

Open
#52 3 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
102
Forks
182
PR merge metrics
No merged PRs in 30d

Description

We are currently encountering a situation where when we enable validation on
either a multiple_select or multiple_checkbox type we will lose data if we enter
more than one option at a time.

If we remove validation from these fields they appear to behave normally.
Any tips you can provide, were only interested at present in ensuring the fields
are required using multiple choices

{
"field_name": "langcheck",
"label": "Language Checkbox",
"preset": "multiple_checkbox",
"required": true ,
"validators": "scheming_required",
"choices": [
{"value": "en-CA [default]", "label": "English (Canadian)"},
{"value": "fr-CA", "label": "French (Canadian)"}
]
},
{
"field_name": "langselect",
"label": "Language Select",
"preset": "multiple_select",
"required": true ,
"validators": "scheming_required",
"choices": [
{"value": "en-CA [default]", "label": "English (Canadian)"},
{"value": "fr-CA", "label": "French (Canadian)"}
]
},

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue in CKAN using the provided multiple_checkbox and multiple_select schemas with scheming_required enabled, comparing behavior with validation removed. Trace the validation and submission handling for multi-value fields; done means required validation works without losing any selected options.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.