-
-
Notifications
You must be signed in to change notification settings - Fork 66
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]: Suport set field errors programmatically #338
Comments
I agree. |
This sounds reasonable to me. Would you mind opening a PR? |
@airjp73 I will do a PR. Do you have some guidance on how to start the project? I just clone it but I'm not sure how to build the library and test the changes |
@airjp73 are you still maintaining the library? I would like to open a PR but I struggled to start the project, know what is the testing approach etc. |
Hi! I am but I don't have much time to work on new features. You'll likely need to add a function to the form store and access that in the The most basic version of this feature probably only touches a couple files. All the building, testing, etc should be doable from the root of the monrepo. But you can probably run some commands from within specific packages too. |
+1 |
What is the new or updated feature that you are suggesting?
I want to set an error on the client side without needing Zod for that.
Something like a
setCustomError
function in theuseFormContext
hook will be great.I can then call it like
setCustomError("myFieldName", "customError")
.We would then need also need a
resetCustomError
function.Why should this feature be included?
I have the field
A
and when it is filled, it calls an external API.Based on the response of the API, I want to be able to set an error to another field
B
using the result of the API call together with the value of the fieldB
The text was updated successfully, but these errors were encountered: