schema
schema copied to clipboard
Option to ignore entry based on value validation
Hi, I encounter the following use case, which requires adding a new option "ignore_extra_values":
from schema import Schema
s = Schema({str: int}, ignore_extra_values=True)
print(s.validate({'some_str': 2, 'a': 'some_str'}))
Expected output:
{'some_str': 2}
Is this some thing easy to do? Any help is greatly appreciated!