Add required attr and validation on key_input