class Validator {

    public void checkPlayerCode(String id, String code) {
        checkPlayerId(id, CANT_BE_NULL);
        checkCode(code, CANT_BE_NULL);
        if (registration.checkUser(id, code) == null) {
            throw new IllegalArgumentException(String.format("Player code is invalid: '%s' for player: '%s'", code, id));
        }
    }

    public  Validator();

}