Optional
maxthe upper bound of the interval the value has to be in
Optional
minthe lower bound of the interval the value has to be in
Optional
namethe name of the ValueObject to identify in a possible ErrorMessage.
'MealPlan.price'
Optional
roundhow should the number be rounded.
'deny'
which causes the validate()
method to throw an error if the number
has decimal places.Generated using TypeDoc
The options for an
Integer
:round?: 'floor' | 'ceil' | 'round' | 'deny'
- how should the number be roundedmin?: number
- minimum allowed numbermax?: number
- maximum allowed number