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

Checking constraints should set field and value for ValidationErrors #66

Closed
jamadden opened this issue Sep 10, 2018 · 0 comments
Closed
Labels

Comments

@jamadden
Copy link
Member

Sometimes custom constraint functions raise a ValidationError subclass instead of returning a boolean, usually because they have a better error message. But if the constraint is a function, it doesn't have access to the field instance, so the ValidationError probably doesn't have a value set for field.

@jamadden jamadden added the bug label Sep 10, 2018
clrpackages pushed a commit to clearlinux-pkgs/zope.schema that referenced this issue Sep 12, 2018
…y checking constraints. Fixes #66

Jason Madden (4):
      Back to development: 4.6.2
      Set the field and value of ValidationError raised by checking constraints. Fixes #66
      Merge pull request #67 from zopefoundation/issue66
      Preparing release 4.6.2

4.6.2 (2018-09-10)
==================

- Fix checking a field's constraint to set the ``field`` and ``value``
  properties if the constraint raises a ``ValidationError``. See
  `issue 66
  <https://github.com/zopefoundation/zope.schema/issues/66>`_.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant