Skip to content

Feature/min items - #306

Open
jscharett wants to merge 4 commits into
dschnelldavis:masterfrom
jscharett:feature/minItems
Open

Feature/min items#306
jscharett wants to merge 4 commits into
dschnelldavis:masterfrom
jscharett:feature/minItems

Conversation

@jscharett

Copy link
Copy Markdown
Contributor

PR Type

What changes does this PR include (check all that apply)?
[x] Bugfix

Related issue / current behavior

When generating a formArray, there is an empty formControl generated. This results in the minItems validator returning true when minItems=1, even though the array is empty/missing.

New behavior

minItems now correctly catches empty/missing arrays

Does this PR introduce a breaking change?

[x] Yes
[ ] No

This PR corrects a typo, changing defautWidgetOptions to defaultWidgetOptions.

@herman1vdb herman1vdb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The defautWidgetOptions typo got me for a while. This PR should've probably been split in 2. eg. Fix typo defautWidgetOptions and Fix formArray minItems validation

@jscharett

Copy link
Copy Markdown
Contributor Author

Agreed, I should have split it, but was in a hurry to get this into my project. I'm usually better about this type of stuff.

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.

2 participants