- From: Will Levine <wlevine@gmail.com>
- Date: Tue, 29 Jun 2004 10:21:42 -0400
(This seems like a rather obvious feature so I apologize if this has been discussed or decided against before and I missed that conversation.) One of the most common types of form validation that I see is the checking to make sure that two text-ish fields contain the same values. I would suggest something like the following to deal with this: <label>Enter Password<input type="password" name="beef" id="foo"></label> <label>Confirm Password<input type="password" confirm="foo" name="checkfoo"></label> (I don't really like confirm as the name of the attribute but I can't come up with anything better at the moment) Obviously, if the two fields didn't match, a validation error. Only the first control would be successful. I suppose you could have more than one than one input confirming the same thing, but I wouldn't really see the point. This would degrade very nicely as long as the server remembered to check for the presence of checkfoo, which would indicate a legacy browser and the need for the server to test for consistency. While the confirm attribute could be implemented for every input type, I wouldn't see any use with types like date(time) or radio. It should probably restricted to the types where it would be useful: password, text, email, number (yesterday, I was registering my cell phone online and needed to type in the phone's serial number twice for confirmation), and possibly uri. Any thoughts? -Will Levine
Received on Tuesday, 29 June 2004 07:21:42 UTC