-
Notifications
You must be signed in to change notification settings - Fork 286
Open
Description
This is perhaps similar to #426 however I thought I should point it out in case it's not.
Essentially PolyModelType
does not validate as I would expect, in fact, it doesn't seem to validate at all by default, unless I'm missing something.
class A(Model):
higher_than_ten = IntType(min_value=10, required=True)
class B(Model):
higher_than_fifty = IntType(min_value=50, required=True)
foo = C(
raw_data=dict(
poly=A(dict(higher_than_ten=1))
),
validate=True
)
# I expect this to raise, but doesn't
foo.validate()
# I expect this to raise, but doesn't
e = A(dict(higher_than_ten=1))
e.validate()
# Raises as expected
Am I correct in thinking the calls to validate (either through instantiation or via method call) above should raise?
Metadata
Metadata
Assignees
Labels
No labels