Table of Contents

Class ValidateNotNegativeAttribute

Namespace
Gamelogic.Extensions
Assembly
Gamelogic.Extensions.dll

Attribute used to mark fields that should not be negative.

[AttributeUsage(AttributeTargets.Field)]
[Version(4, 3, 0)]
public class ValidateNotNegativeAttribute : ValidationAttribute
Inheritance
ValidateNotNegativeAttribute
Derived
Inherited Members
Extension Methods

Remarks

Can be applied to int and float fields.

Methods

Constrain(SerializedProperty)

Constraints the value to be non-negative.

IsValid(SerializedProperty)

Checks if the property is not negative.