Validate one field #464
Replies: 2 comments 1 reply
-
|
I have the same question, the validate function is a bit misleading. When called on a field, I would expect it to validate only this field. Similarily, when calling on a form scope, I would expect to validate only the fields belonging to this scope. This is needed when you have, let's say, part of a form inside a modal where you want only this part to be validated. |
Beta Was this translation helpful? Give feedback.
-
|
I just pushed v8.1.1, which should hopefully fix the issue for you. Looks like the FieldApi's |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I’m using rvf/remix and I can’t figure out how to validate a single field without triggering validation on the entire form.
I have a field that’s marked as required and a button that submits just this field to the backend. When I click the button, I want validation to run only for this field. If it’s empty, it should display "Required".
Right now, I’m using formApi.validate(), but that triggers validation for all fields in the form.
How can I validate only one field?
Beta Was this translation helpful? Give feedback.
All reactions