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

Feature Request: Introduce setSuccess Function Similar to setError in React-Hook-Form #11892

Closed
TanzimHossain2 opened this issue May 16, 2024 · 0 comments
Labels
feature request request a feature to be added waiting-up-vote Waiting for votes from the community.

Comments

@TanzimHossain2
Copy link

Is your feature request related to a problem? Please describe.
Currently, there isn't a straightforward way to set a success message inside the onSubmit function using React-Hook-Form. Users are resorting to various workarounds such as managing an additional state using useState or utilizing setError with custom types like success, which can be cumbersome and less intuitive.

Describe the solution you'd like
I propose the addition of a setSuccess function to React-Hook-Form, similar to setError. This function would allow users to easily set a success message within the onSubmit function without resorting to alternative methods.

Describe alternatives you've considered
Alternatives include managing an extra state using useState or utilizing setError with custom types like success. However, these approaches are less intuitive and may lead to code clutter or confusion.

Additional context
The inclusion of a setSuccess function would enhance the user experience by providing a more streamlined and intuitive way to handle success messages within the React-Hook-Form workflow. This feature would contribute to the overall usability and flexibility of the library.


@TanzimHossain2 TanzimHossain2 added feature request request a feature to be added waiting-up-vote Waiting for votes from the community. labels May 16, 2024
@bluebill1049 bluebill1049 added this to Pending Feature Requests in React Hook Form May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request request a feature to be added waiting-up-vote Waiting for votes from the community.
Projects
React Hook Form
  
Pending Feature Requests
Development

No branches or pull requests

2 participants