Maxlength
<input type="text" maxlength="1" value="fruit" required>