void () { HgReferenceValidator validator = new HgBranchReferenceValidator(hgRepositorySelectorComponent.getRepository()); String name = getTagName(); if (!validator.checkInput(name)) { String message = validator.getErrorText(name); setErrorText(message == null ? HgBundle.message("action.hg4idea.tag.name.error") : message, tagTxt); setOKActionEnabled(false); return; } setErrorText(null); setOKActionEnabled(true); }