﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
19	Automatically generate JavaScript form validation	Adrian Holovaty	Adrian Holovaty	"Django should generate JavaScript form validation for all admin pages, in addition to the server-side validation it already does.

Each FormField object already gets an HTML class of the type of field it is (e.g. ""vCheckboxField"", ""vEmailField"", ""vTextField""), so we can probably build off of that.

OR, we could use {{{XMLHttpRequest}}} to send each field individually and validate everything *server-side*.

======================================================

I've given some more thought to this. We could set up a view that validates a given field via XMLHttpRequest, like this:

admin.6newslawrence.com/validate_field/polls/polls/question/?value=blah

(The ""value=blah"" would be POST data, not GET data.)

But here's a problem: What do we do for validators that expect all_data, i.e. the ones that validate a field according to the value of another field? We could solve that by only using dynamic JavaScript? validation to check single fields and using server-side validation for the rest -- but it's a usability problem if some validation errors appear instantly and others appear after form submission."	enhancement	closed	Validators	new-admin	minor	wontfix	validators	tbarta@… Jacob Rief	Design decision needed	0	0	0	0	0	0
