ValidateCompareAttribute class
namespace: Serenity.ComponentModel assembly: Serenity.Net.Core
Requires a value to be the same as the one of another property, e.g. a password and its confirmation, which the forms also check, with the field of that property.
[AttributeUsage(AttributeTargets.Property)]
public class ValidateCompareAttribute : CompareAttribute, IClientValidationRule, IHasTextKey
| parameter |
description |
| otherProperty |
The name of the other property, e.g. nameof(Password). |
Public Members
| name |
description |
| ValidateCompareAttribute(…) |
Requires a value to be the same as the one of another property, e.g. a password and its confirmation, which the forms also check, with the field of that property. |
| Rule { get; } |
|
| RuleParams { get; } |
|
| Side { get; set; } |
|
| TextKey { get; set; } |
|
| const Key |
The type key of the class of the rule on the client side, i.e. Serenity.CompareValidationRule. |
Protected Members
| name |
description |
| override IsValid(…) |
|
See Also