pydantic-core
pydantic-core copied to clipboard
Fail-fast feature
Basic implementation here - #1321
Context: https://github.com/pydantic/pydantic-core/pull/1322#issuecomment-2166806100 https://github.com/pydantic/pydantic/pull/9708#issuecomment-2187337782
fail-fast feature might be extended and used not only for sequence types. It might be useful for other types like mappings or models.
I can see that it can be powerful feature when you can from python validator stop validation process by raising an exception. As was mentioned by @adriangb here - https://github.com/pydantic/pydantic-core/pull/1322#issuecomment-2166806100
I would like to work on both features if you don't mind.
Please let me know if you have some tips and ideas about implementation!
cc @sydney-runkle @adriangb