enum does not accept empty value
Brought to you by:
kwatch
When using an enum, the yml file did not validate is the field was empty, even when the field was not required.
As a workaround, I have used a regexp. Luckily, by default the field contains a space, to I could tell the pattern to accept that as well.
#enum: [fixed, click, variable]
pattern: /fixed|click|variable|[ ]/
Best is of course to have an enum that, if the field is not required, also accepts "no value".