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

Validators on field sets are ignored with zope.interface 5.1.x #252

Closed
mauritsvanrees opened this issue Nov 3, 2020 · 1 comment
Closed

Comments

@mauritsvanrees
Copy link
Member

Seen with Plone 5.2.2, Python 3 (I guess Python 2 as well), with zope.interface updated from 5.0.2 to 5.1.2. Same for 5.1.0 or 5.1.1. Same for Plone 5.2.3-pending.

  • Create a standard easyform.
  • Remove the standard fields and add one non-required field (or remove subject and comments, and make the email field non-required).
  • Add a fieldset.
  • Add a field in this field set and make it required or add a validator.
  • View and submit the form. If the field in the fieldset is required, do not fill it in. If it has a different validator, fill in something that should not validate.
  • Expected is a validation error, but instead you get a thank-you page. Or if the form has a Mailer, you may get an error because the Mailer cannot find the email.

The changes from @djay in PR #190 last year may have something to do with it. At least the PR points to the parts of the code that may need new changes to fit the updated zope.interface.
I suppose it is possible that this fix is no longer needed with the newer zope.interface: it has cleaner inheritance, so maybe it now works as expected without needing extra special code. But that may be wishful thinking.

@mauritsvanrees
Copy link
Member Author

I confirm that the changes from @djay from last year are still needed. They only need to be slightly adjusted. I have done so in my PR #253.

mauritsvanrees added a commit that referenced this issue Nov 5, 2020
On those versions, pin check-manifest to 0.44 to prevent getting version conflicts for `build`, `pep517` and `virtualenv`.

We want to test with newer and older zope.interface versions, for #252
5.2.x is currently 5.2.2, with zope.interface 5.0.2.
5.2.3-pending has zope.interface 5.1.2.

This will fail once 5.2.3-pending is out of pending, but that is just a signal that I can clean this Travis config up again.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant