Flags icon indicating copy to clipboard operation
Flags copied to clipboard

Add `callable` validation to all types

Open donatj opened this issue 11 years ago • 0 comments

Allow a callback that is called on all passed values, ignoring default

$this->displayHelp = & $this->flags->bool('help', false, 'Display this help message.', function(){ return false; });

would cause --help being called to always throw an exception, eg: causing description to appear.

if callable returns anything other than true, use it as the message.

donatj avatar Oct 21 '14 22:10 donatj