Class RequiredValidator
- Namespace
- CloudyWing.FormValidators
- Assembly
- CloudyWing.FormValidators.dll
Validation indicate that a value is required.
public sealed class RequiredValidator : BasicFormValidator, IFormValidator
- Inheritance
-
RequiredValidator
- Implements
- Inherited Members
Constructors
RequiredValidator(string, string, Func<string, string, string>)
Initializes a new instance of the RequiredValidator class.
public RequiredValidator(string column, string value, Func<string, string, string> customErrorMessageAccessor = null)
Parameters
columnstringThe column.
valuestringThe value.
customErrorMessageAccessorFunc<string, string, string>The custom error message accessor. The arguments are column, value.
Properties
DefaultErrorMessageAccessor
Gets the get default error message.
protected override Func<string, string, string> DefaultErrorMessageAccessor { get; }
Property Value
Methods
ValidateValue()
Validates the value.
protected override bool ValidateValue()
Returns
- bool
The validation result.