change the value must be message in text field javascript code example
Example 1: change input required text html
<input type="text" id="username" required placeholder="Enter Name"
oninvalid="this.setCustomValidity('Enter User Name Here')"
oninput="this.setCustomValidity('')" />
Example 2: how to collect input textbox in html
<label for="name">Name:</label>
<input type="text" id="name"><br><br>