Exemple #1
0
    private void UiFormControlOnOnItemValidation(object sender, ref string errorMessage)
    {
        var control = sender as FormEngineUserControl;

        switch (control.Field)
        {
        case "ChatRoomDisplayName":
        case "ChatRoomDescription":
            try
            {
                ChatHelper.CheckNameForBadWords(control.Value.ToString());
            }
            catch (ChatBadWordsException ex)
            {
                errorMessage = ex.Message;
            }
            break;
        }
    }