You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is just an idea, but it could be valuable.
Have a small collection of declarative validators that can be specified directly in the spec. Validators are simply functions that evaluate to Bool and are applied to the value that was parsed successfully. For example range or compare for numbers and other Ord things, length for strings and lists, eg:
port:
etc/spec:
default: 3000
type: number
validators:
- lte:
value: 0
error: "Ports with non-positive values don't make sense"
- gt:
value: 65535
error: "Port numbers are 16-bit"
- lt:
value: 1024
warn: "Using system level port, root privilege will be necessary"
The text was updated successfully, but these errors were encountered:
This is just an idea, but it could be valuable.
Have a small collection of declarative validators that can be specified directly in the spec. Validators are simply functions that evaluate to
Bool
and are applied to the value that was parsed successfully. For examplerange
orcompare
for numbers and otherOrd
things,length
for strings and lists, eg:The text was updated successfully, but these errors were encountered: