ComparableGreaterThanZeroAttribute

Ecng.ComponentModel

Indicates that a comparable value must be greater than zero when provided.

継承元: ComparableValidationAttribute<T>

メソッド

Validate
protected override bool Validate(T? value, bool disableNullCheck)
result = comparableGreaterThanZeroAttribute.Validate(value, disableNullCheck)

Validates that the value is greater than zero if it is not null.

value
The nullable value to validate.
disableNullCheck
A flag indicating whether null value should bypass validation.

戻り値: True if the value is null and null checks are disabled, or if the non-null value is greater than zero; otherwise, false.