Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] create and update form API does not validate passed values against enumerated options #169

Open
signebedi opened this issue Apr 11, 2024 · 1 comment

Comments

@signebedi
Copy link
Owner

When we have passed an enumerated set of options that a form field may adopt, user data should be validated against these to ensure that assumptions are not broken regarding the structure of the data. For example, what if a user submits data using the API that does not conform to the set of available options for a checkbox field, and then another user goes to modify that using the front end. Key assumptions here will be broken that will ultimately harm the user experience.

@signebedi
Copy link
Owner Author

The key idea here is that the options passed as part of a field in the form config is not currently used as part of the RESTful API to assess data; it is only used to generate a list of options for the UI. This is problematic for data that is submitted through the API but sometimes accessed and edited within the UI - especially data containing radio, checkbox, and select fields where the value passed during initial creation in the RESTful API isn't among the list of enumerated options... So there will be some broken logic.

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

No branches or pull requests

1 participant