<input type="number" value="1" min="1" max="1000" step="1" pattern="\d" /><span></span>
input[value=""] + span::after {
    content: "";
}
input:valid + span::after {
    content: "\2713";
    color: limegreen;
}
input:invalid + span::after {
    content: "X";
    color: #ce0000;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.