[html5] r3817 - [e] (0) required='' example

whatwg at whatwg.org whatwg at whatwg.org
Sun Sep 13 00:34:33 PDT 2009


Author: ianh
Date: 2009-09-13 00:34:32 -0700 (Sun, 13 Sep 2009)
New Revision: 3817

Modified:
   index
   source
Log:
[e] (0) required='' example

Modified: index
===================================================================
--- index	2009-09-13 07:12:00 UTC (rev 3816)
+++ index	2009-09-13 07:34:32 UTC (rev 3817)
@@ -34863,8 +34863,31 @@
 
   </div>
 
+  <div class=example>
 
+   <p>The following form has two required fields, one for an e-mail
+   address and one for a password. It also has a third field that is
+   only considerd valid if the user types the same password in the
+   password field and this third field.</p>
 
+   <pre><h1>Create new account</h1>
+<form action="/newaccount" method=post>
+ <p>
+  <label for="username">E-mail address:</label>
+  <input id="username" type=email required name=un>
+ <p>
+  <label for="password1">Password:</label>
+  <input id="password1" type=password required name=up>
+ <p>
+  <label for="password2">Confirm password:</label>
+  <input id="password2" type=password onforminput="setCustomValidity(value != password1.value ? 'Passwords do not match.' : '')">
+ <p>
+  <input type=submit value="Create account">
+</form></pre>
+
+  </div>
+
+
   <h6 id=the-multiple-attribute><span class=secno>4.10.4.2.6 </span>The <code title=attr-input-multiple><a href=#attr-input-multiple>multiple</a></code> attribute</h6>
 
   <p>The <dfn id=attr-input-multiple title=attr-input-multiple><code>multiple</code></dfn>

Modified: source
===================================================================
--- source	2009-09-13 07:12:00 UTC (rev 3816)
+++ source	2009-09-13 07:34:32 UTC (rev 3817)
@@ -38765,8 +38765,31 @@
 
   </div>
 
+  <div class="example">
 
+   <p>The following form has two required fields, one for an e-mail
+   address and one for a password. It also has a third field that is
+   only considerd valid if the user types the same password in the
+   password field and this third field.</p>
 
+   <pre><h1>Create new account</h1>
+<form action="/newaccount" method=post>
+ <p>
+  <label for="username">E-mail address:</label>
+  <input id="username" type=email required name=un>
+ <p>
+  <label for="password1">Password:</label>
+  <input id="password1" type=password required name=up>
+ <p>
+  <label for="password2">Confirm password:</label>
+  <input id="password2" type=password onforminput="setCustomValidity(value != password1.value ? 'Passwords do not match.' : '')">
+ <p>
+  <input type=submit value="Create account">
+</form></pre>
+
+  </div>
+
+
   <h6>The <code title="attr-input-multiple">multiple</code> attribute</h6>
 
   <p>The <dfn title="attr-input-multiple"><code>multiple</code></dfn>




More information about the Commit-Watchers mailing list