private void textBoxAlias_TextChanged(object sender, EventArgs e) { errorProvider.Clear(); string failReason; string originalAlias = _scriptObject.Alias; _scriptObject.Alias = textBoxAlias.Text.Trim(); if (!_scriptObject.AliasValidate(_scriptObject, out failReason)) { textBoxAliasPlural.Text = _scriptObject.AliasPluralDefault(_scriptObject); _scriptObject.Alias = originalAlias; errorProvider.SetError(textBoxAlias, failReason); textBoxAlias.BackColor = ErrorBackColor; //e.Cancel = true; return; } textBoxAliasPlural.Text = _scriptObject.AliasPluralDefault(_scriptObject); _scriptObject.Alias = originalAlias; // Reset, so we don't inadvertantly save textBoxAlias.BackColor = Color.White; }