HTML
<form action="">
<p>Username: </p>
<input type="text" pattern="[A-Za-z0-9]+" required>
<input type="submit" value="Validar">
</form>
CSS
input {
padding: 8px;
margin: 1rem 0;
border: none;
box-shadow: black 0 0 4px;
}