Skip to content

Commit

Permalink
Document ComparisonProperty placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremySkinner committed May 26, 2022
1 parent 587931e commit b007a1d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/built-in-validators.md
Expand Up @@ -45,6 +45,7 @@ Example error: *'Surname' should not be equal to 'Foo'*
String format args:
* `{PropertyName}` – Name of the property being validated
* `{ComparisonValue}` – Value that the property should not equal
* `{ComparisonProperty}` – Name of the property being compared against (if any)
* `{PropertyValue}` – Current value of the property

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

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

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

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

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

## Predicate Validator
Expand Down
1 change: 1 addition & 0 deletions docs/configuring.md
Expand Up @@ -25,6 +25,7 @@ These include the predicate validator (`Must` validator), the email and the rege

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

Used only in the Length validator:
* `{MinLength}` – Minimum length
Expand Down

0 comments on commit b007a1d

Please sign in to comment.