ByteValidationExtension extension
Extension to add validation methods to ByteConverter.
Methods
-
assertMaxSize(
ByteConverter maxSize, [String? name]) → void -
Available on ByteConverter, provided by the ByteValidationExtension extension
Asserts that this size does not exceedmaxSize. -
assertPositive(
[String? name]) → void -
Available on ByteConverter, provided by the ByteValidationExtension extension
Asserts that this size is positive. -
isInRange(
{required ByteConverter min, required ByteConverter max}) → bool -
Available on ByteConverter, provided by the ByteValidationExtension extension
Returns true if this size is within the specified range. -
isWithinQuota(
ByteConverter quota) → bool -
Available on ByteConverter, provided by the ByteValidationExtension extension
Returns true if this size is withinquota. -
validate(
{ByteConverter? maxSize, ByteConverter? minSize, bool requirePositive = false}) → ValidationResult -
Available on ByteConverter, provided by the ByteValidationExtension extension
Validates this size against the given constraints.