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
rangea string[]
or enum
of all possible values the given value can match.
keys
as well as the values
will be looked up to match!const stringArray = ['first', 'second', ...];
enum NumericEnum {
first, second, ...
}
enum AlsoNumericEnum {
first = 1, second = 2, ...
}
enum StringEnum {
first = 'first', second = 'second', ...
}
enum HeterogenousEnum {
first = 1, second = 'second', ...
}
Optional
regexa regular expression the given value must match
Generated using TypeDoc
The options for a
NonEmptyString
:range?
- a list of other strings or an enum the string has to matchregex?: RegExp
- a regular expression the string has to matchmin?: number
- minimum required length of the stringmax?: number
- maximum allowed length of the string