Skip to content

Commit b007a1d

Browse files
committed
Document ComparisonProperty placeholder
1 parent 587931e commit b007a1d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/built-in-validators.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Example error: *'Surname' should not be equal to 'Foo'*
4545
String format args:
4646
* `{PropertyName}` – Name of the property being validated
4747
* `{ComparisonValue}` – Value that the property should not equal
48+
* `{ComparisonProperty}` – Name of the property being compared against (if any)
4849
* `{PropertyValue}` – Current value of the property
4950

5051
Optionally, a comparer can be provided to ensure a specific type of comparison is performed:
@@ -80,6 +81,7 @@ Example error: *'Surname' should be equal to 'Foo'*
8081
String format args:
8182
* `{PropertyName}` – Name of the property being validated
8283
* `{ComparisonValue}` – Value that the property should equal
84+
* `{ComparisonProperty}` – Name of the property being compared against (if any)
8385
* `{PropertyValue}` – Current value of the property
8486

8587
```csharp
@@ -169,6 +171,7 @@ Notes: Only valid on types that implement `IComparable<T>`
169171
String format args:
170172
* `{PropertyName}` – Name of the property being validated
171173
* `{ComparisonValue}` – Value to which the property was compared
174+
* `{ComparisonProperty}` – Name of the property being compared against (if any)
172175
* `{PropertyValue}` – Current value of the property
173176

174177
## Less Than Or Equal Validator
@@ -185,6 +188,7 @@ Example error: *'Credit Limit' must be less than or equal to 100.*
185188
Notes: Only valid on types that implement `IComparable<T>`
186189
* `{PropertyName}` – Name of the property being validated
187190
* `{ComparisonValue}` – Value to which the property was compared
191+
* `{ComparisonProperty}` – Name of the property being compared against (if any)
188192
* `{PropertyValue}` – Current value of the property
189193

190194
## Greater Than Validator
@@ -201,6 +205,7 @@ Example error: *'Credit Limit' must be greater than 0.*
201205
Notes: Only valid on types that implement `IComparable<T>`
202206
* `{PropertyName}` – Name of the property being validated
203207
* `{ComparisonValue}` – Value to which the property was compared
208+
* `{ComparisonProperty}` – Name of the property being compared against (if any)
204209
* `{PropertyValue}` – Current value of the property
205210

206211
## Greater Than Or Equal Validator
@@ -217,6 +222,7 @@ Example error: *'Credit Limit' must be greater than or equal to 1.*
217222
Notes: Only valid on types that implement `IComparable<T>`
218223
* `{PropertyName}` – Name of the property being validated
219224
* `{ComparisonValue}` – Value to which the property was compared
225+
* `{ComparisonProperty}` – Name of the property being compared against (if any)
220226
* `{PropertyValue}` – Current value of the property
221227

222228
## Predicate Validator

docs/configuring.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ These include the predicate validator (`Must` validator), the email and the rege
2525

2626
Used in comparison validators: (`Equal`, `NotEqual`, `GreaterThan`, `GreaterThanOrEqual`, etc.)
2727
* `{ComparisonValue}` – Value that the property should be compared to
28+
* `{ComparisonProperty}` – Name of the property being compared against (if any)
2829

2930
Used only in the Length validator:
3031
* `{MinLength}` – Minimum length

0 commit comments

Comments
 (0)