Skip to content

Commit ca3eaf7

Browse files
committed
fix: modify based on review comments
1 parent 1febe91 commit ca3eaf7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

data_spec_validator/spec/validators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ def validate(value, extra, data) -> Tuple[bool, Union[Exception, str]]:
375375
info = '' if ok else ValueError(f'Length of {repr(value)} must be between {lower_bound} and {upper_bound}')
376376
else:
377377
ok = lower_bound <= len(value)
378-
info = '' if ok else ValueError(f'Length of {repr(value)} must be greater than {lower_bound}')
378+
info = '' if ok else ValueError(f'Length of {repr(value)} must be greater than or equal to {lower_bound}')
379379
return ok, info
380380

381381

test/test_spec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ class LengthSpec:
261261
with self.assertRaises(ValueError) as e:
262262
validate_data_spec(dict(length_field='ah'), LengthSpec)
263263

264-
expected_error_msg = "field: LengthSpec.length_field, reason: Length of 'ah' must be greater than 3"
264+
expected_error_msg = "field: LengthSpec.length_field, reason: Length of 'ah' must be greater than or equal to 3"
265265
self.assertEqual(str(e.exception), expected_error_msg)
266266

267267
def test_decimal_place(self):

0 commit comments

Comments
 (0)