<input placeholder="Numbers only or shake" pattern="\d+" class="input" name="text" type="password">
.input { max-width: 190px; padding: 12px; border: none; border-radius: 4px; box-shadow: 2px 2px 7px 0 rgb(0, 0, 0, 0.2); outline: none; color: dimgray; } .input:invalid { animation: justshake 0.3s forwards;