I have come across this several times and it is annoying. Dojo has a required attribute to run form validation. HTML 5 now also uses the same attribute. The problem arises because HTML5 does not care about what value is required = required = "all" means that it is necessary.
So, on my form elements, if I require = "false" to point to Dojo, I don't want this to be confirmed. In some cases, Chrome and Firefox HTML 5 validation is performed in this input field.
I have tried the HTML 5 newsletter attribute, but it seems that if the attribute is required, it ignores it.
I think I should ask a question. How to disable HTML5 validation in general? or in another way. Why HTML 5 validation is performed if I do not specify the HTML 5 document type.
thank
Here is a complete sample of the problem. Open it in Firefox or Chrome
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<script language="javascript" type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/dojo/1.4.0/dojo/dojo.xd.js"></script>
<script language="javascript" type="text/javascript">
dojo.require("dojo.parser");
dojo.require("dijit.form.Form");
dojo.addOnLoad(function () {
dojo.parser.parse();
});
</script>
<form novalidate="novalidate" dojoType="dijit.form.Form">
<select required="false" formnovalidate="formnovalidate">
<option value="" >Please Choose A Category...</option>
<option value="one" >One</option>
</select>
<button type="submit">Save</button>
</form>
</body>
</html>
source
share