on 08-28-2023 10:42 AM
Hi colleagues,
Is there any way in CAP to validate a value agains some range with only one side restricted by just annotations?
unfortunately @assert.range has only 2-sides restriction as per documentation
https://cap.cloud.sap/docs/guides/providing-services#assert-range
The most common case is when I want to restrict my number with non-negative (>= 0) or positive (> 0) value.
Thank you.
You can give the open range as the maximum/minimum for the data type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi dinu.pavithran,
thank you, looks like a rough but viable way to go.
Should I refer to https://help.sap.com/docs/HANA_SERVICE_CF/7c78579ce9b14a669c1f3295b0d8ca16/20a1569875191014b507cf392...
?
or some different page? my concern is I can't really see the max value for decimals.
User | Count |
---|---|
77 | |
11 | |
10 | |
8 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.