Class ClientOnlyValidationRule<TProperties, TClientProperties>
Represents a base class for client-only validation rules.
public abstract class ClientOnlyValidationRule<TProperties, TClientProperties> : ValidationRule<TProperties, TClientProperties, object>, IValidationRule where TProperties : ValidationRuleProperties, new() where TClientProperties : ValidationRuleClientProperties, new()
Type Parameters
TProperties
TClientProperties
- Inheritance
-
objectValidationRule<TProperties, TClientProperties, object>ClientOnlyValidationRule<TProperties, TClientProperties>
- Implements
- Inherited Members
- Extension Methods
Remarks
Client-only validation rule is executed only on client-side.
Properties
ErrorMessage
Gets the error message.
protected abstract string ErrorMessage { get; }
Property Value
- string
Methods
ConfigureClientProperties(TClientProperties)
Allows set validation rule client properties.
protected override Task ConfigureClientProperties(TClientProperties clientProperties)
Parameters
clientProperties
TClientPropertiesCurrent instance of client properties.
Returns
- Task
Validate(object, IFormFieldValueProvider)
Implementation of abstract method that always returns a successful validation result.
public override sealed Task<ValidationResult> Validate(object value, IFormFieldValueProvider formFieldValueProvider)
Parameters
value
objectValue.
formFieldValueProvider
IFormFieldValueProviderForm field value provider.
Returns
- Task<ValidationResult>
Remarks
Method does no actual validation as the validation rule is executed only on client-side.