W3C home > Mailing lists > Public > public-html-diffs@w3.org > September 2009

hixie: required='' example (whatwg r3817)

From: poot <cvsmail@w3.org>
Date: Sun, 13 Sep 2009 16:29:51 +0900 (JST)
To: public-html-diffs@w3.org
Message-Id: <20090913072951.982C12BCB3@toro.w3.mag.keio.ac.jp>
hixie: required='' example (whatwg r3817)

http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.2985&r2=1.2986&f=h
http://html5.org/tools/web-apps-tracker?from=3816&to=3817

===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.2985
retrieving revision 1.2986
diff -u -d -r1.2985 -r1.2986
--- Overview.html	13 Sep 2009 07:06:57 -0000	1.2985
+++ Overview.html	13 Sep 2009 07:29:29 -0000	1.2986
@@ -30976,6 +30976,28 @@
   string, then the element is <a href="#suffering-from-being-missing">suffering from being
   missing</a>.</p>
 
+  </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>&lt;h1&gt;Create new account&lt;/h1&gt;
+&lt;form action="/newaccount" method=post&gt;
+ &lt;p&gt;
+  &lt;label for="username"&gt;E-mail address:&lt;/label&gt;
+  &lt;input id="username" type=email required name=un&gt;
+ &lt;p&gt;
+  &lt;label for="password1"&gt;Password:&lt;/label&gt;
+  &lt;input id="password1" type=password required name=up&gt;
+ &lt;p&gt;
+  &lt;label for="password2"&gt;Confirm password:&lt;/label&gt;
+  &lt;input id="password2" type=password onforminput="setCustomValidity(value != password1.value ? 'Passwords do not match.' : '')"&gt;
+ &lt;p&gt;
+  &lt;input type=submit value="Create account"&gt;
+&lt;/form&gt;</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 class="XXX annotation"><b>Status: </b><i>Last call for comments</i><p>The <dfn id="attr-input-multiple" title="attr-input-multiple"><code>multiple</code></dfn>
   attribute is a <a href="#boolean-attribute">boolean attribute</a> that indicates whether
   the user is to be allowed to specify more than one value.<h6 id="the-maxlength-attribute"><span class="secno">4.10.4.2.7 </span>The <code title="attr-input-maxlength"><a href="#attr-input-maxlength">maxlength</a></code> attribute</h6><p class="XXX annotation"><b>Status: </b><i>Last call for comments</i><p>The <dfn id="attr-input-maxlength" title="attr-input-maxlength"><code>maxlength</code></dfn>
Received on Sunday, 13 September 2009 07:30:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:09:00 UTC