Skip to content

Commit 0bc87c9

Browse files
authored
Merge pull request #105247 from yoelhor/patch-22
Update predicates.md
2 parents c039e8e + f96bb3d commit 0bc87c9

File tree

1 file changed

+19
-30
lines changed

1 file changed

+19
-30
lines changed

articles/active-directory-b2c/predicates.md

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ manager: celestedg
99
ms.service: active-directory
1010
ms.workload: identity
1111
ms.topic: reference
12-
ms.date: 10/28/2019
12+
ms.date: 02/24/2020
1313
ms.author: marsma
1414
ms.subservice: B2C
1515
---
@@ -42,12 +42,13 @@ The **Predicate** element contains the following attributes:
4242
| --------- | -------- | ----------- |
4343
| Id | Yes | An identifier that's used for the predicate. Other elements can use this identifier in the policy. |
4444
| Method | Yes | The method type to use for validation. Possible values: **IsLengthRange**, **MatchesRegex**, **IncludesCharacters**, or **IsDateRange**. The **IsLengthRange** value checks whether the length of a string claim value is within the range of minimum and maximum parameters specified. The **MatchesRegex** value checks whether a string claim value matches a regular expression. The **IncludesCharacters** value checks whether a string claim value contains a character set. The **IsDateRange** value checks whether a date claim value is between a range of minimum and maximum parameters specified. |
45+
| HelpText | No | An error message for users if the check fails. This string can be localized using the [language customization](localization.md) |
4546

4647
The **Predicate** element contains the following elements:
4748

4849
| Element | Occurrences | Description |
4950
| ------- | ----------- | ----------- |
50-
| UserHelpText | 1:1 | An error message for users if the check fails. This string can be localized using the [language customization](localization.md) |
51+
| UserHelpText | 0:1 | (Deprecated) An error message for users if the check fails. |
5152
| Parameters | 1:1 | The parameters for the method type of the string validation. |
5253

5354
The **Parameters** element contains the following elements:
@@ -65,20 +66,18 @@ The **Parameter** element contains the following attributes:
6566
The following example shows a `IsLengthRange` method with the parameters `Minimum` and `Maximum` that specify the length range of the string:
6667

6768
```XML
68-
<Predicate Id="IsLengthBetween8And64" Method="IsLengthRange">
69-
<UserHelpText>The password must be between 8 and 64 characters.</UserHelpText>
70-
<Parameters>
71-
<Parameter Id="Minimum">8</Parameter>
72-
<Parameter Id="Maximum">64</Parameter>
69+
<Predicate Id="IsLengthBetween8And64" Method="IsLengthRange" HelpText="The password must be between 8 and 64 characters.">
70+
<Parameters>
71+
<Parameter Id="Minimum">8</Parameter>
72+
<Parameter Id="Maximum">64</Parameter>
7373
</Parameters>
7474
</Predicate>
7575
```
7676

7777
The following example shows a `MatchesRegex` method with the parameter `RegularExpression` that specifies a regular expression:
7878

7979
```XML
80-
<Predicate Id="PIN" Method="MatchesRegex">
81-
<UserHelpText>The password must be numbers only.</UserHelpText>
80+
<Predicate Id="PIN" Method="MatchesRegex" HelpText="The password must be numbers only.">
8281
<Parameters>
8382
<Parameter Id="RegularExpression">^[0-9]+$</Parameter>
8483
</Parameters>
@@ -88,8 +87,7 @@ The following example shows a `MatchesRegex` method with the parameter `RegularE
8887
The following example shows a `IncludesCharacters` method with the parameter `CharacterSet` that specifies the set of characters:
8988

9089
```XML
91-
<Predicate Id="Lowercase" Method="IncludesCharacters">
92-
<UserHelpText>a lowercase letter</UserHelpText>
90+
<Predicate Id="Lowercase" Method="IncludesCharacters" HelpText="a lowercase letter">
9391
<Parameters>
9492
<Parameter Id="CharacterSet">a-z</Parameter>
9593
</Parameters>
@@ -165,7 +163,7 @@ The **PredicateGroup** element contains the following elements:
165163

166164
| Element | Occurrences | Description |
167165
| ------- | ----------- | ----------- |
168-
| UserHelpText | 1:1 | A description of the predicate that can be helpful for users to know what value they should type. |
166+
| UserHelpText | 0:1 | A description of the predicate that can be helpful for users to know what value they should type. |
169167
| PredicateReferences | 1:n | A list of predicate references. |
170168

171169
The **PredicateReferences** element contains the following attributes:
@@ -202,58 +200,50 @@ With **Predicates** and **PredicateValidationsInput** you can control the comple
202200

203201
```XML
204202
<Predicates>
205-
<Predicate Id="IsLengthBetween8And64" Method="IsLengthRange">
206-
<UserHelpText>The password must be between 8 and 64 characters.</UserHelpText>
203+
<Predicate Id="IsLengthBetween8And64" Method="IsLengthRange" HelpText="The password must be between 8 and 64 characters.">
207204
<Parameters>
208205
<Parameter Id="Minimum">8</Parameter>
209206
<Parameter Id="Maximum">64</Parameter>
210207
</Parameters>
211208
</Predicate>
212209

213-
<Predicate Id="Lowercase" Method="IncludesCharacters">
214-
<UserHelpText>a lowercase letter</UserHelpText>
210+
<Predicate Id="Lowercase" Method="IncludesCharacters" HelpText="a lowercase letter">
215211
<Parameters>
216212
<Parameter Id="CharacterSet">a-z</Parameter>
217213
</Parameters>
218214
</Predicate>
219215

220-
<Predicate Id="Uppercase" Method="IncludesCharacters">
221-
<UserHelpText>an uppercase letter</UserHelpText>
216+
<Predicate Id="Uppercase" Method="IncludesCharacters" HelpText="an uppercase letter">
222217
<Parameters>
223218
<Parameter Id="CharacterSet">A-Z</Parameter>
224219
</Parameters>
225220
</Predicate>
226221

227-
<Predicate Id="Number" Method="IncludesCharacters">
228-
<UserHelpText>a digit</UserHelpText>
222+
<Predicate Id="Number" Method="IncludesCharacters" HelpText="a digit">
229223
<Parameters>
230224
<Parameter Id="CharacterSet">0-9</Parameter>
231225
</Parameters>
232226
</Predicate>
233227

234-
<Predicate Id="Symbol" Method="IncludesCharacters">
235-
<UserHelpText>a symbol</UserHelpText>
228+
<Predicate Id="Symbol" Method="IncludesCharacters" HelpText="a symbol">
236229
<Parameters>
237230
<Parameter Id="CharacterSet">@#$%^&amp;*\-_+=[]{}|\\:',.?/`~"();!</Parameter>
238231
</Parameters>
239232
</Predicate>
240233

241-
<Predicate Id="PIN" Method="MatchesRegex">
242-
<UserHelpText>The password must be numbers only.</UserHelpText>
234+
<Predicate Id="PIN" Method="MatchesRegex" HelpText="The password must be numbers only.">
243235
<Parameters>
244236
<Parameter Id="RegularExpression">^[0-9]+$</Parameter>
245237
</Parameters>
246238
</Predicate>
247239

248-
<Predicate Id="AllowedAADCharacters" Method="MatchesRegex">
249-
<UserHelpText>An invalid character was provided.</UserHelpText>
240+
<Predicate Id="AllowedAADCharacters" Method="MatchesRegex" HelpText="An invalid character was provided.">
250241
<Parameters>
251242
<Parameter Id="RegularExpression">(^([0-9A-Za-z\d@#$%^&amp;*\-_+=[\]{}|\\:',?/`~"();! ]|(\.(?!@)))+$)|(^$)</Parameter>
252243
</Parameters>
253244
</Predicate>
254245

255-
<Predicate Id="DisallowedWhitespace" Method="MatchesRegex">
256-
<UserHelpText>The password must not begin or end with a whitespace character.</UserHelpText>
246+
<Predicate Id="DisallowedWhitespace" Method="MatchesRegex" HelpText="The password must not begin or end with a whitespace character.">
257247
<Parameters>
258248
<Parameter Id="RegularExpression">(^\S.*\S$)|(^\S+$)|(^$)</Parameter>
259249
</Parameters>
@@ -357,8 +347,7 @@ With the **Predicates** and **PredicateValidations** elements you can control th
357347

358348
```XML
359349
<Predicates>
360-
<Predicate Id="DateRange" Method="IsDateRange">
361-
<UserHelpText>The date must be between 01-01-1980 and today.</UserHelpText>
350+
<Predicate Id="DateRange" Method="IsDateRange" HelpText="The date must be between 01-01-1980 and today.">
362351
<Parameters>
363352
<Parameter Id="Minimum">1980-01-01</Parameter>
364353
<Parameter Id="Maximum">Today</Parameter>

0 commit comments

Comments
 (0)