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

Reintroduce ability to validate form field's value independent of input's error text #1342

Merged

Conversation

lreardon
Copy link
Contributor

@lreardon lreardon commented Dec 23, 2023

Connection with issue(s)
Close #1348

Connected to

Solution description
To avoid breaking changes, implemented valueIsValid and valueHasError getters on FormBuilderFieldState which perform the behavior of the overridden isValid and hasError getters of FormFieldState.

To Do

  • Read contributing guide
  • Check the original issue to confirm it is fully satisfied
  • Add solution description to help guide reviewers
  • Add unit test to verify new or fixed behavior
  • If apply, add documentation to code properties and package readme

@lreardon
Copy link
Contributor Author

lreardon commented Jan 2, 2024

@deandreamatias This issue relates to the overrides of isValid and hasError that you implemented 8 months ago. In doing so, the package seems to have lost the ability to assess the validity of an input's value independent of the errorText.

This pull request reintroduces the ability to assess the validity of an input's value independent of the errorText while preserving the overrides you wrote to ensure there are no breaking changes.

@lreardon
Copy link
Contributor Author

lreardon commented Jan 3, 2024

Ran dart format .

@lreardon lreardon changed the title Update form_builder_field.dart Reintroduce ability to validate form field's value independent of input's error text Jan 3, 2024
Copy link

codecov bot commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (04660f1) 87.71% compared to head (6e55bbf) 87.74%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1342      +/-   ##
==========================================
+ Coverage   87.71%   87.74%   +0.03%     
==========================================
  Files          21       21              
  Lines         757      759       +2     
==========================================
+ Hits          664      666       +2     
  Misses         93       93              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@deandreamatias deandreamatias merged commit ba065e5 into flutter-form-builder-ecosystem:main Jan 5, 2024
5 checks passed
@lreardon lreardon deleted the patch-1 branch January 5, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I just wanna run isValid
2 participants