Input field validation

Hi,

I want create an input text field can only input EVEN numbers and do nothing when input other characters.

What codes I’ve to put in the button?

Help please.

Chris