diff options
author | dvvvvvv <dvvvvvv@dvvvvvv.com> | 2019-11-10 15:53:26 +0900 |
---|---|---|
committer | Abin Simon <abinsimon10@gmail.com> | 2019-12-16 16:41:50 +0530 |
commit | e6ee773277c7ef50971537b3a59d5350f937cdb4 (patch) | |
tree | 498edbeb0370bec37505127ca7492b30e91a59e5 | |
parent | 50cf660567d2178f843df4f8ea7a3f2b9f60000e (diff) |
add date validation message
-rw-r--r-- | src/app.rs | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -138,7 +138,7 @@ pub fn build() -> App<'static, 'static> { .default_value("date") .multiple(true) .number_of_values(1) - .help("How to display date"), + .help("How to display date [possible values: date, relative, +date-time-format]"), ) .arg( Arg::with_name("timesort") @@ -213,7 +213,10 @@ fn validate_date_argument(arg: String) -> Result<(), String> { } else if &arg == "relative" { Result::Ok(()) } else { - Result::Err("possible values: date, relative".to_owned()) + Result::Err( + "possible values: date, relative, +date-time-format" + .to_owned() + ) } } |