add key code validator