-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Why is Controller fieldState naming inconsistent? #8195
Comments
Hey, @GollyJer! I've updated the API to include @bluebill1049 u can freely reject #8196 if the API is supposed to be different between the form validation state and the field's one |
Thanks, guys for the input. @Moshyfawn I think this will be introducing a breaking change to the existing version. This is actually by design, we have form level state |
I see your point, @bluebill1049! It is a breaking change and having V8 on the horizon, I understand how inconvenient it would be. Maybe we can re-visit the API consistency once the V8 is out the door. One additional thing: what's the point of {errors.fieldName && <p role="alert">{errors.fieldName.message}</p>} |
yes, @Moshyfawn let's deprecate that field state, I don't think it's server too much value. if you want to adjust your PR and point to v8? |
Sounds good! |
In formState 👉
isValid
- boolean - Set to true if the form doesn't have any errors.In fieldState 👉
invalid
- boolean - Invalid state for current input.This threw me off a bit. Had to go to the docs to find the
invalid
return object.Just curious if this is a purposeful difference, and if so what is the reason?
Best,
Jeremy
The text was updated successfully, but these errors were encountered: