snipt

Ctrl+h for KB shortcuts

HTML

Custom messages for HTML5 validation

<input type="email" required oninvalid="this.setCustomValidity(this.willValidate?'':'your custom message')"/>
https://snipt.net/embed/b68952f317cdf5571028afe32638bfae/
https://snipt.net/raw/b68952f317cdf5571028afe32638bfae/
b68952f317cdf5571028afe32638bfae
html
HTML
1
2016-09-21T22:07:10
True
False
False
Aug 30, 2013 at 08:01 AM
/api/public/snipt/78031/
custom-messages-for-html5-validation
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="nt">&lt;input</span> <span class="na">type=</span><span class="s">&quot;email&quot;</span> <span class="na">required</span> <span class="na">oninvalid=</span><span class="s">&quot;this.setCustomValidity(this.willValidate?&#39;&#39;:&#39;your custom message&#39;)&quot;</span><span class="nt">/&gt;</span> </span></pre></div> </td></tr></table>
HTML5, validation

HTML

Nagłówek HTML5 z RDF

1
2
3
4
5
6
<!DOCTYPE html>
<!--[if IEMobile 7]><html class="iem7" lang="pl" dir="ltr"><![endif]-->
<!--[if lte IE 6]><html class="lt-ie9 lt-ie8 lt-ie7" lang="pl" dir="ltr"><![endif]-->
<!--[if (IE 7)&(!IEMobile)]><html class="lt-ie9 lt-ie8" lang="pl" dir="ltr"><![endif]-->
<!--[if IE 8]><html class="lt-ie9" lang="pl" dir="ltr"><![endif]-->
<!--[if (gte IE 9)|(gt IEMobile 7)]><!--><html lang="pl" dir="ltr" prefix="content: http://purl.org/rss/1.0/modules/content/ dc: http://purl.org/dc/terms/ foaf: http://xmlns.com/foaf/0.1/ og: http://ogp.me/ns# rdfs: http://www.w3.org/2000/01/rdf-schema# sioc: http://rdfs.org/sioc/ns# sioct: http://rdfs.org/sioc/types# skos: http://www.w3.org/2004/02/skos/core# xsd: http://www.w3.org/2001/XMLSchema#"><!--<![endif]-->
https://snipt.net/embed/3d5f6663a7cc4aefb4d6c1ebbbf4d203/
https://snipt.net/raw/3d5f6663a7cc4aefb4d6c1ebbbf4d203/
3d5f6663a7cc4aefb4d6c1ebbbf4d203
html
HTML
6
2016-09-25T08:40:57
True
False
False
/api/public/snipt/51039/
nagowek-html5-z-rdf
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="cp">&lt;!DOCTYPE html&gt;</span> </span><span id="L-2"><a name="L-2"></a><span class="c">&lt;!--[if IEMobile 7]&gt;&lt;html class=&quot;iem7&quot; lang=&quot;pl&quot; dir=&quot;ltr&quot;&gt;&lt;![endif]--&gt;</span> </span><span id="L-3"><a name="L-3"></a><span class="c">&lt;!--[if lte IE 6]&gt;&lt;html class=&quot;lt-ie9 lt-ie8 lt-ie7&quot; lang=&quot;pl&quot; dir=&quot;ltr&quot;&gt;&lt;![endif]--&gt;</span> </span><span id="L-4"><a name="L-4"></a><span class="c">&lt;!--[if (IE 7)&amp;(!IEMobile)]&gt;&lt;html class=&quot;lt-ie9 lt-ie8&quot; lang=&quot;pl&quot; dir=&quot;ltr&quot;&gt;&lt;![endif]--&gt;</span> </span><span id="L-5"><a name="L-5"></a><span class="c">&lt;!--[if IE 8]&gt;&lt;html class=&quot;lt-ie9&quot; lang=&quot;pl&quot; dir=&quot;ltr&quot;&gt;&lt;![endif]--&gt;</span> </span><span id="L-6"><a name="L-6"></a><span class="c">&lt;!--[if (gte IE 9)|(gt IEMobile 7)]&gt;&lt;!--&gt;</span><span class="nt">&lt;html</span> <span class="na">lang=</span><span class="s">&quot;pl&quot;</span> <span class="na">dir=</span><span class="s">&quot;ltr&quot;</span> <span class="na">prefix=</span><span class="s">&quot;content: http://purl.org/rss/1.0/modules/content/ dc: http://purl.org/dc/terms/ foaf: http://xmlns.com/foaf/0.1/ og: http://ogp.me/ns# rdfs: http://www.w3.org/2000/01/rdf-schema# sioc: http://rdfs.org/sioc/ns# sioct: http://rdfs.org/sioc/types# skos: http://www.w3.org/2004/02/skos/core# xsd: http://www.w3.org/2001/XMLSchema#&quot;</span><span class="nt">&gt;</span><span class="c">&lt;!--&lt;![endif]--&gt;</span> </span></pre></div> </td></tr></table>
HTML5, RDF, head, html
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.