flutter-form-builder-ecosystem / form_builder_validators

Form Builder Validators is set of validators for FormFields. It provides common validators and a way to reuse multiple validators
https://pub.dev/packages/form_builder_validators
BSD 3-Clause "New" or "Revised" License
51 stars 99 forks source link

Refactor code #111

Closed martijn00 closed 3 months ago

martijn00 commented 4 months ago

Connection with issue(s)

Close #110

Solution description

Splits up the code into better testable and more maintainable code.

Screenshots or Videos

To Do

martijn00 commented 4 months ago

@deandreamatias I've finished all the validators. Next up are the tests. Feel free to review the API surface as it is now so i can adjust if needed.

martijn00 commented 4 months ago

@deandreamatias I've finished all the tests. Some are still failing and I'll look into those.

Can you review and let me know if anything needs to change, or where to add more tests?

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 95.46828% with 45 lines in your changes missing coverage. Please review.

Project coverage is 95.00%. Comparing base (8f40bc6) to head (9cf707d).

Files Patch % Lines
lib/src/identity/username_validator.dart 72.97% 10 Missing :warning:
lib/src/core/aggregate_validator.dart 81.81% 2 Missing :warning:
lib/src/core/compose_validator.dart 75.00% 2 Missing :warning:
lib/src/core/conditional_validator.dart 77.77% 2 Missing :warning:
lib/src/core/default_value_validator.dart 75.00% 2 Missing :warning:
lib/src/core/log_validator.dart 81.81% 2 Missing :warning:
lib/src/core/not_equal_validator.dart 60.00% 2 Missing :warning:
lib/src/core/or_validator.dart 75.00% 2 Missing :warning:
lib/src/core/skip_when_validator.dart 77.77% 2 Missing :warning:
lib/src/core/transform_validator.dart 77.77% 2 Missing :warning:
... and 16 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #111 +/- ## ========================================== + Coverage 93.31% 95.00% +1.69% ========================================== Files 5 92 +87 Lines 613 1002 +389 ========================================== + Hits 572 952 +380 - Misses 41 50 +9 ``` | [Flag](https://app.codecov.io/gh/flutter-form-builder-ecosystem/form_builder_validators/pull/111/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flutter-form-builder-ecosystem) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/flutter-form-builder-ecosystem/form_builder_validators/pull/111/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flutter-form-builder-ecosystem) | `95.00% <95.46%> (+1.69%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flutter-form-builder-ecosystem#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

martijn00 commented 3 months ago

@deandreamatias this is now ready to go!

martijn00 commented 3 months ago

@deandreamatias can you make the release?

deandreamatias commented 3 months ago

@martijn00 need more documentation about this changes.

  1. Add breaking changes and how migrate on README
  2. Add link to these section on changelog
  3. Update the table of contents on readme
  4. Update documentation on readme about how add new validator

If you can do this, I will appreciate