Pricing

Okyline · 2026-05-30 21:58
Price validation with discount and tax
StudioFree Java libFree Documentation & AIFree
Okyline symbols reference
@
Required
Field must be present
?
Nullable
Value can be null
{ , }
String Length
Min and max characters
(...)
Value Constraint
Number ranges or enums
~ ~
Format
Regex or built-in format
[ , ]
Array Size
Min and max elements
#
Key Field
Unique identifier
!
Uniqueness
No duplicate objects
Item Constraint
For array elements
1{
2 "$title": "Pricing",
3 "$description": "Price validation with discount and tax",
4 "$oky": {
5 "price|@ (>0)|Base price": "100.00",
6 "discount|@ (>=0)|Discount amount": "20.00",
7 "taxRate|@ (0, 0.1, 0.20)|Tax rate (0.20 = 20%)": "0.20",
8 "finalPrice|@ (%CheckPricing)|Final price after discount and tax": "96.00"
9 },
10 "$compute": {
11 "CheckPricing": "finalPrice == (price - discount) * (1 + taxRate)"
12 }
13}