PDA

View Full Version : support for form validation



sjivan
13 Nov 2006, 3:55 AM
I was wondering if you're planning of adding support for form validation. I recollect reading that the cell handlers of the editable datagrid were not yet reusable in forms. Has this changed?

One of the best forms I've seen is http://www.rememberthemilk.com/signup/ This could be hand build but it would be nice if YUI ext provided a better programmatic API which allowed you to easily check if all fields are valid, set focus of first field with error etc.

Support for client side and ajax validation (user name already exists) would be great.

The Dojo form validation has some useful features too : http://archive.dojotoolkit.org/nightly/tests/widget/test_validate.html

Unfortunately there are a couple of things that really annoy me
1. support for server side validation not baked in
2. the error text shows up upfront when the form is initially displayed and disappears when the user types in valid text. I much prefer the rememberthemilk version where on form display no errors are initially displayed.


Let me know your thoughts..

Thanks,
Sanjiv

tryanDLS
13 Nov 2006, 2:27 PM
Jack,

I was playing around with building some form validation for a login dialog. What do you think about adding the YAHOO.widget.Dialog.prototype.getData method to YAHOO.ext.Element? Or maybe subclassing Element to FormElement, and adding it there?

I don't remember if the whole Form validation thing is on your radar, or not. If you have something in the works, I won't spend a lot of time on this.

jack.slocum
13 Nov 2006, 6:32 PM
The form stuff is definitely on the radar and will be a primary focus of 0.34.

Jamie Avins
23 Jan 2007, 4:46 PM
The form stuff is definitely on the radar and will be a primary focus of 0.34.

When you say "form stuff" what are you talking about?