Skip to content

Feat/registration error#308

Open
ezedike-evan wants to merge 11 commits intoOgstevyn:mainfrom
ezedike-evan:feat/registration_error
Open

Feat/registration error#308
ezedike-evan wants to merge 11 commits intoOgstevyn:mainfrom
ezedike-evan:feat/registration_error

Conversation

@ezedike-evan
Copy link

Fix walletAddress undefined validation error on Registration Page

Description

This PR resolves the "Invalid input: expected string, received undefined" error encountered on the registration page in Ogstevyn/payeasy.

The issue occurred when users clicked the AuthButton and submitted the form. The walletAddress field was not properly registered with react-hook-form, causing it to return undefined. Since the validation schema expects a string, the submission failed with a validation error.

This update ensures that walletAddress is correctly registered, tracked, and validated, preventing undefined values from being passed to the schema.

Related Issues

Closes #305

Changes Made

  • Properly registered walletAddress with react-hook-form
  • Ensured walletAddress value is tracked and included in form submission
  • Added fallback handling to prevent undefined from reaching validation schema
  • Adjusted validation logic to guarantee a string value is passed

How to Test

  1. Navigate to the Registration Page.

  2. Connect a wallet (if applicable) or populate the wallet address field.

  3. Click the AuthButton to submit the form.

  4. Verify:

    • No "Invalid input: expected string, received undefined" error occurs.
    • Form submits successfully when all required fields are valid.
    • Validation errors display correctly when fields are invalid.

@Ogstevyn
Copy link
Owner

resolve conflicts

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.

Fix "Invalid input: expected string, received undefined" error on Registration Page

2 participants