This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This gives the error below. However, this is valid HTML5 syntax: https://www.w3.org/TR/html5/forms.html#file-upload-state-(type=file) Bad value ".pdf" for attribute "accept" on element "input": Expected "/" but the literal ended. Syntax of MIME type list: (WF2) From line 10, column 4; to line 10, column 54 (Rule Category: Attributes) Product Version: NetBeans IDE Dev (Build 201605200002) Updates: Updates available Java: 1.8.0_77; Java HotSpot(TM) 64-Bit Server VM 25.77-b03 Runtime: Java(TM) SE Runtime Environment 1.8.0_77-b03 System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Hi, shouldn't it be like this: <input type="file" accept="application/pdf" /> ?
Yes, that's also valid, but ".pdf" is equally valid. Quoting from the URL in the first comment: If specified, the attribute must consist of a set of comma-separated tokens, each of which must be an ASCII case-insensitive match for one of the following: The string audio/* Indicates that sound files are accepted. The string video/* Indicates that video files are accepted. The string image/* Indicates that image files are accepted. A valid MIME type with no parameters Indicates that files of the specified type are accepted. A string whose first character is a "." (U+002E) character Indicates that files with the specified file extension are accepted.
Ok, I tested this on https://html5.validator.nu/ which we are using for validating html in Netbeans. I will find out why it is not accepting in Netbeans.