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

74 - Js-required-validation not working for MultiValueField #73

Open
klipstein opened this issue Nov 6, 2011 · 0 comments
Open

74 - Js-required-validation not working for MultiValueField #73

klipstein opened this issue Nov 6, 2011 · 0 comments

Comments

@klipstein
Copy link
Owner

Problem occours when we have MultiValueField with required=True.

MultiValueField sets required=False on every field it aggregates (in **init**()). Then during validation, on every field it aggregates, it uses MultiValueField.required to check if field was required. As far as server-side validation is concerned everything is OK. But in case of js-required-validation field is treated as not required, because MultiValueField set reqired=False on it.

So despite I got MultiValueField.required=True, Dojango doesn't set proper "required" validation in javascript on all fields. In fact all fields are optional, and when form is sent with an empty field, you get server-side validation errors: "Field X required, but empty".

I use Dojango 0.5.1, Django trunk 14865 (two months old), Python 2.7.1.

Original link: http://code.google.com/p/dojango/issues/detail?id=74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant