-
Notifications
You must be signed in to change notification settings - Fork 31
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
Validators hold state if you vlad multiple times in the same context #7
Comments
@di, what's happening is, we're initializing a Vlad object inside a function, like so: (in a python notebook)
if there's a problem, the output looks correct the first time we call
if we run the same function again & again though, the error counts start increasing. (And the UniquenessValidators start to break)
|
I think doing |
Yeah, I'll definitely try that out. It requires a lot of knowledge about Vladiate though. I think this would be nicer API:
|
Is there any reason why you'd want to pass validators into a new Vlad with state already attached? If not, we could flush them or something in the Vlad instatiation. |
I decided this is a bug, because it is using the default |
I guess if you wanted to override them for some reason, you would expect to be able to do this. |
It would be nice to be able to run validation from within python scripts or a shell repeatedly, without holding over state from the previous validation.
The text was updated successfully, but these errors were encountered: