Class FieldValidationRule
- Namespace
- Excalibur.Dispatch.Validation.Context
- Assembly
- Excalibur.Dispatch.dll
Defines validation rules for a specific field.
public sealed class FieldValidationRule
- Inheritance
-
FieldValidationRule
- Inherited Members
- Extension Methods
Properties
CustomValidator
Gets or sets custom validation logic.
public Func<object?, bool>? CustomValidator { get; set; }
Property Value
- Func<object, bool>
The current CustomValidator value.
ErrorMessage
Gets or sets the error message to use when validation fails.
public string? ErrorMessage { get; set; }
Property Value
- string
The current ErrorMessage value.
ExpectedType
Gets or sets the expected type of the field value.
public Type? ExpectedType { get; set; }
Property Value
- Type
The current ExpectedType value.
MaxLength
Gets or sets the maximum length for string fields.
public int? MaxLength { get; set; }
Property Value
MinLength
Gets or sets the minimum length for string fields.
public int? MinLength { get; set; }
Property Value
Pattern
Gets or sets a regular expression pattern for string fields.
public string? Pattern { get; set; }
Property Value
Required
Gets or sets a value indicating whether the field is required.
public bool Required { get; set; }