Skip to content

docs: clarify v11 checkNullOrEmpty default for optional fields #116 - #166

Closed
AzazelSensei wants to merge 1 commit into
flutter-form-builder-ecosystem:mainfrom
AzazelSensei:docs/116-check-null-or-empty
Closed

docs: clarify v11 checkNullOrEmpty default for optional fields #116#166
AzazelSensei wants to merge 1 commit into
flutter-form-builder-ecosystem:mainfrom
AzazelSensei:docs/116-check-null-or-empty

Conversation

@AzazelSensei

Copy link
Copy Markdown

Connection with issue(s)

Connected to #116

Solution description

v11 sets checkNullOrEmpty: true on every validator, so a field with only maxLength (or email, etc) fails when left blank. I did not change that default.

I added a README example that shows checkNullOrEmpty: false for optional fields, and expanded the v10 → v11 note so this is not just one line in the migration list.

Screenshots or Videos

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 behaviour
  • If apply, add documentation to code properties and package readme

A lone maxLength (or email, etc) now fails on blank because
checkNullOrEmpty defaults to true. Show the false flag so optional
fields stay optional. Default is unchanged.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-slop Detected AI agent slop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants