You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One should be allowed to specify a custom validation function which will be run against an argument value.
From a birds eye view:
let app = App::new("test").arg(Arg::with_name("opt").long("long").takes_value(true).validator(|val| {if val.len() == 5{Ok(val)}else{Err("--long must be 5 characters long")}}));
If possible I may also look at providing some pre-conceived validator functions which would could be used like so:
let app = App::new("test").arg(Arg::with_name("opt").long("long").takes_value(true).validator(ArgValidators::U8));
The text was updated successfully, but these errors were encountered:
One should be allowed to specify a custom validation function which will be run against an argument value.
From a birds eye view:
If possible I may also look at providing some pre-conceived validator functions which would could be used like so:
The text was updated successfully, but these errors were encountered: