[VE][html5] Form onsubmit Error: Invalid Return

Hello,

I couldn't find in the HTML 5 spec where it talks about the form 
element's onsubmit event, but previously the typical form validation was 
onsubmit="return validationFunction()". However, this gives a validation 
error:

/Line 8, Column 31/: Bad value return false for attribute onsubmit on 
element form: invalid return

|	<form onsubmit="return false"*>*|

What is the correct way to cancel a form submission in HTML 5? The error 
message is not very clear in this regard considering it's valid in 
previous specs and supported in modern browsers. Full example below:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="ISO-8859-1" />
<title>Form Validation Test</title>
</head>
<body>
<form onsubmit="return false">
<input type="submit" value="Do Not Submit Me!" />
</form>
</body>
</html>

Thank you,
Paul

Received on Saturday, 22 January 2011 07:06:43 UTC