Skip to content

Implement min/max list length validation - #3722

Merged
ipspace merged 1 commit into
devfrom
valid-list-len
Jul 31, 2026
Merged

Implement min/max list length validation#3722
ipspace merged 1 commit into
devfrom
valid-list-len

Conversation

@ipspace

@ipspace ipspace commented Jul 31, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR extends netlab’s attribute validation for list-typed attributes by adding support for minimum and maximum list length constraints, along with updated coverage tests and developer documentation describing the new validation options.

Changes:

  • Add min_length / max_length support to the list type validator (must_be_list).
  • Replace the previous empty-list error coverage with a more comprehensive list validation error fixture (attr-list.yml / .log).
  • Document the new list validation options in the developer validation types reference.

Reviewed changes

Copilot reviewed 2 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/coverage/errors/attr-list.yml New coverage error topology exercising empty/non-empty, nested-list, and min/max list length behaviors.
tests/coverage/errors/attr-list.log Expected error output for the new list validation coverage scenario.
tests/coverage/errors/attr-empty-list.yml Removed older, narrower empty-list coverage fixture (superseded by attr-list).
tests/coverage/errors/attr-empty-list.log Removed expected log for the superseded empty-list fixture.
netsim/data/types.py Implements min_length / max_length checks in must_be_list.
docs/dev/validation-types.txt Documents min_length / max_length list validation options and adds a footnote clarifying scalar-to-list conversion.

Comment thread netsim/data/types.py
@ipspace
ipspace merged commit 74d9cf2 into dev Jul 31, 2026
11 checks passed
@ipspace
ipspace deleted the valid-list-len branch July 31, 2026 09:45
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