Validation
Last updated
Last updated
The validation methods Geralt uses can be called to avoid ugly if statement validation at the top of functions. This is handy for .
Checks that an integer is equal to the valid size.
size
is not equal to validSize
.
Checks that an integer is between the minimum and maximum size.
size
is less than minSize
or greater than maxSize
.
Checks that an integer is not less than the minimum size.
size
is less than minSize
.
Checks that an integer is not greater than the maximum size.
size
is greater than maxSize
.
Checks that an integer is a multiple of another integer.
size
is less than or equal to zero or not a multiple of multipleOf
.
Checks that the length of a span is not equal to zero.
size
is equal to 0.
Checks that an integer is not less than or equal to zero.
size
is less than or equal to 0.
Checks that an array is not null.
value
is null.
Checks that a string is not null or empty.
value
is null.
value
has a length of 0.