Skip to content

Commit 730265f

Browse files
Merge pull request #288 from SisiVero/required-added-to-search-input
"required" added to search input
2 parents cc4ac8c + f47dae4 commit 730265f

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/assets/js/script.js

-4
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ document.addEventListener("DOMContentLoaded", function (e) {
3131

3232
// construct the URL
3333
function buildURL(form) {
34-
if (form.query === "") {
35-
alert("Please enter a search value");
36-
return;
37-
}
3834
if (form.searchEngineURL === undefined) {
3935
alert("Please select a search engine");
4036
return;

src/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ <h3>Find content you can share, use, and remix.</h3>
155155
id="query"
156156
name="query"
157157
value=""
158-
placeholder="Enter your search query" />
158+
placeholder="Enter your search query" required/>
159159
<button class="search-button">Search</button>
160160
</div>
161161
<div class="body-search-description" role="contentinfo">

0 commit comments

Comments
 (0)