[PR #4154] refactor: install form #24422

Closed
opened 2026-02-21 20:22:59 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/4154

State: closed
Merged: Yes


Description

This change has modified the verification of the install form, using react-hook-form to manage the form, and using zod to verify the form data.

At the same time, the error reporting method when the form item verification fails is improved. Display errors directly below the input box instead of using toast

Before
image

Affter
image

Related #3667

Type of Change

Please delete options that are not relevant.

  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade, three new dependencies have been added, react-hook-form, @hookform/resolvers, zod

How Has This Been Tested?

Enter the system installation page http://localhost:3000/install , fill in the form and switch languages ​​at will

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/4154 **State:** closed **Merged:** Yes --- # Description This change has modified the verification of the install form, using react-hook-form to manage the form, and using zod to verify the form data. At the same time, the error reporting method when the form item verification fails is improved. Display errors directly below the input box instead of using toast Before ![image](https://github.com/langgenius/dify/assets/33956589/dadc6f3e-6981-47c7-a63a-0229ee31822f) Affter <img width="685" alt="image" src="https://github.com/langgenius/dify/assets/33956589/e8abc60b-8654-4cd2-b6dc-c56ef0e2971a"> Related #3667 ## Type of Change Please delete options that are not relevant. - [x] Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement - [x] Dependency upgrade, three new dependencies have been added, `react-hook-form`, `@hookform/resolvers`, `zod` # How Has This Been Tested? Enter the system installation page http://localhost:3000/install , fill in the form and switch languages ​​at will # Suggested Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] My changes generate no new warnings - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:22:59 -05:00
yindo closed this issue 2026-02-21 20:22:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#24422