Class BasicFormValidator
- Namespace
- CloudyWing.FormValidators.Core
- Assembly
- CloudyWing.FormValidators.dll
The basic form validator abstract class.
public abstract class BasicFormValidator : FormValidatorBase, IFormValidator
- Inheritance
-
BasicFormValidator
- Implements
- Derived
- Inherited Members
Constructors
BasicFormValidator(string, string, Func<string, string, string>)
Initializes a new instance of the FormValidatorBase class.
public BasicFormValidator(string column, string value, Func<string, string, string> customErrorMessageAccessor)
Parameters
columnstringThe column.
valuestringThe value.
customErrorMessageAccessorFunc<string, string, string>The custom error message accessor. The arguments are column, value.
Properties
CustomErrorMessage
Gets the custom error message.
protected override string CustomErrorMessage { get; }
Property Value
- string
The custom error message.
CustomErrorMessageAccessor
Gets or sets the custom error message accessor.
public Func<string, string, string> CustomErrorMessageAccessor { get; }
Property Value
DefaultErrorMessage
Gets the default error message.
protected override string DefaultErrorMessage { get; }
Property Value
- string
The default error message.
DefaultErrorMessageAccessor
Gets the get default error message.
protected abstract Func<string, string, string> DefaultErrorMessageAccessor { get; }
Property Value
HasCustomErrorMessage
Gets a value indicating whether this instance has custom error message.
protected override bool HasCustomErrorMessage { get; }
Property Value
- bool
trueif this instance has custom error message; otherwise,false.