validateWith

Helper function to add custom validating delegate.

This function is meant to be used with UFCS, so that it can be placed within option definition chain.

In contrast with validateEachWith, this functions makes a single call to delegate with all values.

T
validateWith
(
T : IEntry
)

Examples

1 new Program("rm")
2     .add(new Argument("target", "target to remove")
3         .validateWith((entry, args) {
4             foreach (arg; args) {
5                 // do something
6             }
7         })
8     )

See Also

DelegateValidator, validateEachWith

Meta