Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to ignore entry based on value validation #267

Open
Jerry-Ma opened this issue Sep 22, 2021 · 0 comments
Open

Option to ignore entry based on value validation #267

Jerry-Ma opened this issue Sep 22, 2021 · 0 comments

Comments

@Jerry-Ma
Copy link
Contributor

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant