Skip to content

Commit

Permalink
Added min_len and max_len to sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
trollfot committed Apr 30, 2024
1 parent 640a9b7 commit d2db60a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/jsonschema_colander/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ def extract(cls, params: Mapping, available: set):
min=params.get('minLength', -1),
max=params.get('maxLength', -1)
))
attributes['min_len'] = params.get('minLength', 0)
if 'maxLength' in params:
attributes['max_len'] = params.get['maxLength']

if 'default' in available:
attributes['default'] = params.get('default')
if 'pattern' in available:
Expand Down

0 comments on commit d2db60a

Please sign in to comment.