Table of Contents

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

column string

The column.

value string

The value.

customErrorMessageAccessor Func<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

Func<string, string, string>

The get default error message.

Methods

ValidateValue()

Validates the value.

protected override bool ValidateValue()

Returns

bool

The validation result.