Skip to content

Add callable validation to all types #6

@donatj

Description

@donatj

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions