False XHTML validation

Answered

In this code, IntelliJ points out that multiple attribute is not allowed when it works fine and it is required for multiple files to be uploaded. Here is the code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<!--suppress XmlDefaultAttributeValue -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Tomcat - File Upload</title>
</head>
<body>
<h3>File Upload:</h3>
Select up to 10 files to upload (must be under 50 MB in total):
<br/>
<form action="UploadServlet" enctype="multipart/form-data" method="post">
<input type="file" name="thisAttributeIsRequired" multiple="multiple"/> <!--multiple attribute is required for proper function and is not an error-->
<br/>
<input type="submit"/>
</form>
</body>
</html>

0
2 comments
Avatar
Permanently deleted user

Well this is embarrassing!

Sorry, I was misled by it working without any problems...

0

Please sign in to leave a comment.