Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is HTML 5 validation triggered if I don't have a HTML 5 doctype?
    primarykey
    data
    text
    <p>I've run into this a few times now and it's getting annoying. In Dojo there is a required attribute to trigger form validation. HTML 5 now also uses this same attribute. The problem comes in because HTML5 doesns't care what the value of required= is required="anything" means it's required.</p> <p>So on my form elements if I have required="false" to indicate to dojo I do not want this validated. In some instances on Chrome and Firefox HTML 5 validation is running on that input field.</p> <p>I've tried the HTML 5 novalidate attribute but it seems if required attribute is there it ignores it.</p> <p>I guess I should ask a question. How do I disable HTML5 validation altogether? or put another way Why is HTML 5 validation running if I'm not specifying an HTML 5 doc type.</p> <p>Thanks</p> <p>Here is full sample of the issue. Open this in Firefox or Chrome</p> <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;body&gt; &lt;script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/dojo/1.4.0/dojo/dojo.xd.js"&gt;&lt;/script&gt; &lt;script language="javascript" type="text/javascript"&gt; dojo.require("dojo.parser"); dojo.require("dijit.form.Form"); dojo.addOnLoad(function () { dojo.parser.parse(); }); &lt;/script&gt; &lt;form novalidate="novalidate" dojoType="dijit.form.Form"&gt; &lt;select required="false" formnovalidate="formnovalidate"&gt; &lt;option value="" &gt;Please Choose A Category...&lt;/option&gt; &lt;option value="one" &gt;One&lt;/option&gt; &lt;/select&gt; &lt;button type="submit"&gt;Save&lt;/button&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload