def parse_obj(cls, obj):
assert type(obj) == dict, ("It can only parse dict type object.")
required_args = cls.__slots__
given_args = obj.keys()
// Check if given_args have args that is not required.
for arg in given_args:
if arg not in required_args:
After Change
// Validation.
assert type(obj) == dict, ("It can only parse dict type object.")
for field, schema in cls.__schema__.items():
required, default, arg_type = schema
if field not in obj:
if required:
raise ValidationError("{} is required, but doesn"t "