Skip to content

Commit f97117e

Browse files
committed
Merge pull request #117 from andrewSC/message-fix-pr
Fix min and maxPropeties message
2 parents 04239db + 090290d commit f97117e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
2+
.idea
23

34
*.pyc
45
*.pyo

jsonschema/_validators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,14 +299,14 @@ def required_draft4(validator, required, instance, schema):
299299

300300
def minProperties_draft4(validator, mP, instance, schema):
301301
if validator.is_type(instance, "object") and len(instance) < mP:
302-
yield ValidationError("%r is too short" % (instance,))
302+
yield ValidationError("%r does not have enough properties" % (instance,))
303303

304304

305305
def maxProperties_draft4(validator, mP, instance, schema):
306306
if not validator.is_type(instance, "object"):
307307
return
308308
if validator.is_type(instance, "object") and len(instance) > mP:
309-
yield ValidationError("%r is too short" % (instance,))
309+
yield ValidationError("%r has too many properties" % (instance,))
310310

311311

312312
def allOf_draft4(validator, allOf, instance, schema):

0 commit comments

Comments
 (0)