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

Add validation of boolean type fields #842

Open
mjordan opened this issue Nov 5, 2024 · 0 comments
Open

Add validation of boolean type fields #842

mjordan opened this issue Nov 5, 2024 · 0 comments
Assignees
Labels
code cleanup Clean up code, including code-level comments

Comments

@mjordan
Copy link
Owner

mjordan commented Nov 5, 2024

Currently, boolean fields like published (which is named status internally to Drupal) are not validated to ensure they only contain either a 1 or a 0. If any other values appear in the JSON pushed up to Drupal, the request fails with a 422 status and a primitive type error message.

Workbench already validates other field types so this new validation can use that established pattern.

@mjordan mjordan added the code cleanup Clean up code, including code-level comments label Nov 5, 2024
@mjordan mjordan self-assigned this Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code cleanup Clean up code, including code-level comments
Projects
None yet
Development

No branches or pull requests

1 participant