Namespace: Wisej.Web

Assembly: Wisej.Framework (

Validates controls that cannot be left empty.

public class RequiredValidationRule : ValidationRule


Initializes a new instance of the RequiredValidationRule class.


Nullable<Int32>: Returns or sets the required minimum number of characters. (Default: null)

String: Returns or sets the name of the validation rule. (Default: "Required")

Boolean: Returns or sets whether the control can be empty or its required to have a value. (Default: True)

Boolean: Returns or sets whether empty controls with spaces are considered empty and fail validation. (Default: True)


Validates the control using the validation rule.

Returns: Boolean. true if the validation is successful; otherwise false.

Last updated