I created a simple page with a list box and a text area with conditions that all should be required.
The List box is working fine, but the textarea box doesn't tell that the field is required to be filled.
<!DOCTYPE html>
<html>
<head>
<title>Ratings & Reviews</title>
<body>
<form>
<span>Customer Service*</span>
<span>
<select name=customer id=aa required>
<option selected="rate" value="" disabled>rate</option>
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
</select>
</span>
<br><br>
<span>Value for money*</span>
<span>
<select name=money id=aa required>
<option selected="rate" value="" disabled>rate</option>
<option value=1>1</option>
<option value=2>2</option>
<option value=3>3</option>
<option value=4>4</option>
<option value=5>5</option>
</select>
</span>
<div>
<textarea name="reviews" rows=11 cols=50 maxlength=250 required>
</textarea>
</div>
<div id=submit>
<br>
<input type=submit name=submit value=submit>
</div>
</form>
</body>
</html>
required
attribute is a boolean value. If it exists, thetextarea
will be required to fill in. Therefore, the behavior ofrequired
is equal torequired="required"
– Alannaalano