Welcome! Please see the About page for a little more info on how this works.

0 votes
in tools.cli by

aratare on Slack had this code:

["-v" nil "Verbosity level; may be specified up to 2 times. Levels: INFO (Default) -> DEBUG -> TRACE"
    ;; If no long-option is specified, an option :id must be given
    :id :min-level
    :default 0
    :update-fn inc
    :validate [(fn [a]
                 (println a)
                 (<= a 2)) "Verbosity level cannot exceed 2."]]

and asked:

and a is printed as true instead of either the level before or after applying update-fn. Is there a way to work around this so I can validate after update-fn has been called? Thanks in advance. (edited)

1 Answer

0 votes
by
selected by
 
Best answer
...