diff --git a/source/dotnet/Library/AdaptiveCards.Rendering.Wpf/AdaptiveContainerRenderer.cs b/source/dotnet/Library/AdaptiveCards.Rendering.Wpf/AdaptiveContainerRenderer.cs index b9f67c8a91..283f47a1dc 100644 --- a/source/dotnet/Library/AdaptiveCards.Rendering.Wpf/AdaptiveContainerRenderer.cs +++ b/source/dotnet/Library/AdaptiveCards.Rendering.Wpf/AdaptiveContainerRenderer.cs @@ -372,6 +372,10 @@ public static FrameworkElement EncloseElementInPanel(AdaptiveRenderContext conte panel.Children.Add(RenderLabel(context, inputElement, elementForAccessibility)); AddSpacing(context, context.Config.Inputs.Label.InputSpacing, panel); } + else if (inputElement.IsRequired) + { + context.Warnings.Add(new AdaptiveWarning((int)AdaptiveWarning.WarningStatusCode.EmptyLabelInRequiredInput, "Input is required but there's no label for required hint rendering")); + } panel.Children.Add(enclosingElement); enclosingElement = panel; diff --git a/source/dotnet/Library/AdaptiveCards/AdaptiveWarning.cs b/source/dotnet/Library/AdaptiveCards/AdaptiveWarning.cs index 58256fe00f..1a5b886ba4 100644 --- a/source/dotnet/Library/AdaptiveCards/AdaptiveWarning.cs +++ b/source/dotnet/Library/AdaptiveCards/AdaptiveWarning.cs @@ -6,7 +6,7 @@ namespace AdaptiveCards public class AdaptiveWarning { // TODO #2749: temporary warning code for fallback card. Remove when common set of error codes created and integrated. - public enum WarningStatusCode { UnsupportedSchemaVersion = 7, InvalidLanguage = 12, MaxActionsExceeded = 13 }; + public enum WarningStatusCode { UnsupportedSchemaVersion = 7, InvalidLanguage = 12, MaxActionsExceeded = 13, EmptyLabelInRequiredInput = 14 }; public AdaptiveWarning(int code, string message) {