ComparableNotNegativeAttribute
Ecng.ComponentModel
Indicates that a comparable value must not be negative when provided.
Erbt von: ComparableValidationAttribute<T>
Methoden
Validate
protected override bool Validate(T? value, bool disableNullCheck)
result = comparableNotNegativeAttribute.Validate(value, disableNullCheck)
Validates that the value is not negative if it is provided.
- value
- The nullable value to validate.
- disableNullCheck
- A flag indicating whether null value should bypass validation.
Rückgabe: True if the value is null and null checks are disabled, or if the non-null value is not negative; otherwise, false.