Class IdentifierValidationRule
Validates whether field value is a valid identifier.
[ValidationRuleAttribute(typeof(IdentifierValidationRuleAttribute))]
public sealed class IdentifierValidationRule : ValidationRule<IdentifierValidationRuleProperties, string>, IValidationRule
- Inheritance
-
objectIdentifierValidationRule
- Implements
- Inherited Members
- Extension Methods
Constructors
IdentifierValidationRule(ILocalizationService)
Creates a new instance of IdentifierValidationRule class.
public IdentifierValidationRule(ILocalizationService localizationService)
Parameters
localizationService
ILocalizationService
Properties
ClientRuleName
Gets the client rule name identifier.
public override string ClientRuleName { get; }
Property Value
- string
DefaultErrorMessage
Defines default error message of the validation rule.
protected override string DefaultErrorMessage { get; }
Property Value
- string
Methods
Validate(string, IFormFieldValueProvider)
Validates whether value
is a valid identifier.
public override Task<ValidationResult> Validate(string value, IFormFieldValueProvider formFieldValueProvider)
Parameters
value
stringValue to be validated.
formFieldValueProvider
IFormFieldValueProviderProvider of values of other form fields for contextual validation.
Returns
- Task<ValidationResult>
Returns the validation result.