how to restrict only pdf file in input htmls code example Example: input type file allow only pdf <input type="file" id="test" name="test" accept=".pdf,.doc"/>