`required` attribute failing simple test case

4 views
Skip to first unread message

Ryan Cannon

unread,
Oct 6, 2007, 5:14:43 PM10/6/07
to Web Forms 2.0 Implementation
Greetings,

Having a bit of trouble with @required. As far as I can tell this test
case follows the spec. But it won't work, causing invalid forms to
submit in a larger application:

http://ryancannon.com/wp-content/attic/js/webforms2/test.html

Is this a problem with the library or with my implementation?

Weston Ruter

unread,
Oct 6, 2007, 5:35:38 PM10/6/07
to webf...@googlegroups.com
Ah, I see the problem. You must add a "name" attribute to the INPUT element. A control's validity will only be determined if its willValidate attribute is true. The spec states:

The willValidate attribute of a form control element must return true if all of the following conditions are met:

It must return false if any of these conditions are not met.

Reply all
Reply to author
Forward
0 new messages