Click or drag to resize

RequiredAttributeConstraintTObjectCondition Property

Gets the condition when the attribute is required. When the condition is not met, the attribute is not required.

Namespace:  Aloe.SystemFrameworks.Domain.Validation
Assembly:  Aloe.SystemFrameworks.Domain (in Aloe.SystemFrameworks.Domain.dll) Version: 20.1.3.5
Syntax
public Func<TObject, bool> Condition { get; }

Property Value

Type: FuncTObject, Boolean
The condition when the attribute is required.
Remarks

When the condition evaluates to true or the condition is null, the validation is performed. Otherwise, the validation always succeeds without any checks.

Please note, that even if the condition is null, the validation itself is still performed only for the validation states, for which it is registered.

See Also