尝试获取用户的出生日期(如果不是成年人),则<ValidationTechnicalProfiles>通过



如果用户指定他未满 18 岁,我正在尝试收集用户的出生日期......

我定义了 2 个索赔如下

<ClaimType Id="extension_DateofBirth">
<DisplayName>Date of Birth</DisplayName>
<DataType>dateTime</DataType>
<UserInputType>DateTimeDropdown</UserInputType>
</ClaimType>

<!--Adding  Custom Attribute for AgeGroup -->
<ClaimType Id="extension_AgeGroup">
<DisplayName>Your Age Group</DisplayName>
<DataType>string</DataType>
<UserInputType>DropdownSingleSelect</UserInputType>
<Restriction>
<Enumeration Text="Under 18" Value="Under18" />
<Enumeration Text="Adult" Value="Adult" />
</Restriction>
</ClaimType>

现在在我的

我在

<ValidationTechnicalProfiles>
<ValidationTechnicalProfile ReferenceId="Get-DOB" ContinueOnError="false">
<Preconditions>
<Precondition Type="ClaimEquals" ExecuteActionsIf="false">
<Value>extension_AgeGroup</Value>
<Value>Under18</Value>
<Action>SkipThisValidationTechnicalProfile</Action>
</Precondition>
</Preconditions>
</ValidationTechnicalProfile>
</ValidationTechnicalProfiles>

以及另一个技术配置文件,如下所示,引用为"Get-DOB"。 具体如下


<!--Adding write of DOB based on validation Profile-->
<TechnicalProfile Id="Get-DOB">
<InputClaims>
<InputClaim ClaimTypeReferenceId="extension_DateofBirth" />
</InputClaims>
<OutputClaims>
<OutputClaim ClaimTypeReferenceId="extension_DateofBirth" />
</OutputClaims>
<IncludeTechnicalProfile ReferenceId="AAD-Common" />
</TechnicalProfile>
</TechnicalProfiles>

我有 2 个问题:

  1. 如果我选择 18 岁以下,DOB 应该出现在屏幕上,但事实并非如此。
  2. 在我选择18岁以下并按继续后,资源管理器卡住了 我们将永远处理您的信息

嗨,我通过在用户旅程中完成先决条件而不是使用验证技术配置文件来做到这一点

相关内容

最新更新