You can use the :placeholder-shown
pseudo class. Technically a placeholder is required, but you can use a space instead.
input:not(:placeholder-shown) {_x000D_
border-color: green;_x000D_
}_x000D_
_x000D_
input:placeholder-shown {_x000D_
border-color: red;_x000D_
}
_x000D_
<input placeholder="Text is required" />_x000D_
<input placeholder=" " value="This one is valid" />_x000D_
<input placeholder=" " />
_x000D_