Skip to content

fix: validation on sponsor forms#924

Open
santipalenque wants to merge 1 commit intomasterfrom
fix/sponsor-forms-madatory-fields
Open

fix: validation on sponsor forms#924
santipalenque wants to merge 1 commit intomasterfrom
fix/sponsor-forms-madatory-fields

Conversation

@santipalenque
Copy link
Copy Markdown

@santipalenque santipalenque commented May 8, 2026

https://app.clickup.com/t/86b8k7d1g

Summary by CodeRabbit

  • Bug Fixes
    • Improved validation logic for sponsor cart form fields. Radio buttons and combo boxes now properly validate as required when specified. Checkboxes now correctly validate as boolean with enforced required state. Checkbox lists now require at least one selection when marked as required, providing consistent validation across all field types.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 8, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a9491fec-19ed-4ea7-9b93-ae443752f8c7

📥 Commits

Reviewing files that changed from the base of the PR and between 8994754 and eed2823.

📒 Files selected for processing (1)
  • src/pages/sponsors/sponsor-page/tabs/sponsor-cart-tab/components/edit-form/index.js

📝 Walkthrough

Walkthrough

This PR updates Yup validation schemas for four field types in the sponsor cart form: RadioButtonList and ComboBox now validate as required strings; CheckBox validates as boolean with true enforcement; CheckBoxList validates as an array of strings using minimum length rather than required flag.

Changes

Form Field Validation Schemas

Layer / File(s) Summary
Yup Validation Schema Updates
src/pages/sponsors/sponsor-page/tabs/sponsor-cart-tab/components/edit-form/index.js
RadioButtonList and ComboBox fields validate as string with .required() when is_required is true; CheckBox fields validate as boolean with .oneOf([true]) when required; CheckBoxList fields validate as array of strings with .min(1, ...) instead of .required(...) when required.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • smarcet
  • martinquiroga-exo

Poem

🐰 A checkbox here, a list checkbox there,
Strings and booleans with validation care,
From .required() to .min(1) we bound,
Form schemas tightened, no loose ends found! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing validation logic on sponsor forms, specifically for required field validation in the sponsor cart form.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sponsor-forms-madatory-fields

Comment @coderabbitai help to get the list of available commands and usage tips.

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