Skip to content

refactor(forms):replace yup path parsing with array-level validation and optimize cross-field checks#1235

Merged
parrth20 merged 7 commits into
joinmarket-webui:develfrom
kishore08-07:refactor-forms
May 6, 2026
Merged

refactor(forms):replace yup path parsing with array-level validation and optimize cross-field checks#1235
parrth20 merged 7 commits into
joinmarket-webui:develfrom
kishore08-07:refactor-forms

Conversation

@kishore08-07
Copy link
Copy Markdown
Member

What does this PR do?

Changes

  • Removed yup path parsing; switched to array-level validation with explicit index-based errors
  • Optimized cross-field validation to avoid redundant checks
  • Separated field-level (format) and cross-field (duplicate/reuse) validation
  • Reduced unnecessary re-validation using resolver context
  • Improved type safety by removing unsafe casts and using typed schemas
  • Updated tests to reflect the new validation behavior

@parrth20 parrth20 self-requested a review April 30, 2026 16:28
@parrth20 parrth20 added the refactoring Code refactoring without functional changes label Apr 30, 2026
kishore08-07 and others added 2 commits April 30, 2026 22:28
Copy link
Copy Markdown
Member

@parrth20 parrth20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kishore08-07 Nice direction overall, the array-level validation is cleaner than parsing Yup paths. I've left one comment though because the resolver context wiring looks wrong and can break reused-address validation in the actual form.

Comment thread src/components/sweep/SweepPage.tsx Outdated
@kishore08-07 kishore08-07 requested a review from parrth20 May 5, 2026 14:13
Copy link
Copy Markdown
Member

@parrth20 parrth20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kishore08-07 LGTM now, thanks for updating this.

@parrth20 parrth20 merged commit 1b37ad3 into joinmarket-webui:devel May 6, 2026
3 checks passed
@kishore08-07 kishore08-07 deleted the refactor-forms branch May 6, 2026 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Code refactoring without functional changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants