-
Notifications
You must be signed in to change notification settings - Fork 28
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
Should form validation not be triggered when required fields are left blank? #30
Comments
I think this is rare use case: usually if the user needs to submit data you prepopulate the field, so that some columns are filled up and others need to be filled. But depending how you wish to use the field this could be easily worked around having your own validators checking that you have at least 1 row of filled in stuff in the grid? |
Lets take this as an example If the user leaves their 'city' blank and presses submit, shouldn't there be an error saying they have skipped that value for the row? Do you have an example of where you've done manual validation to do what I'm after? |
Hmm... that should happen. Smells like a bug. |
Can you please confirm that you get this behaviour as well? Any ideas how much effort a fix would be? |
I don't have any Plones where this is installed at the moment. But I'll dig up some old version where I know it should be working (as the bug might be also caused by some internal changes in z3c.form, plone.app.z3cform, etc.) |
You can write a custom widget validator (see here) to implement described behavior:
In |
I just installed the datagridfield demo package. When you have a field that has required=True, even if that field is not entered the form still submits without any validation errors.
Is this a known issue?
The text was updated successfully, but these errors were encountered: