Skip to content

cli11 check never called after transform validator #675

Answered by phlptp
dhsu123 asked this question in Q&A
Discussion options

You must be logged in to vote

For a validator the return string is an error message. Any changes to the string should be modified in place.

So since your function returns a string it will be interpreted as an error and cease processing at that point. so the check would never get called.

The signature of the function call for a mutation validator is std::string(std::string &)
The input is the argument to process (passed by reference so it can be modified) the output is an error string if any.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dhsu123
Comment options

@phlptp
Comment options

Answer selected by dhsu123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants