summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordvvvvvv <dvvvvvv@dvvvvvv.com>2019-11-10 15:53:26 +0900
committerAbin Simon <abinsimon10@gmail.com>2019-12-16 16:41:50 +0530
commite6ee773277c7ef50971537b3a59d5350f937cdb4 (patch)
tree498edbeb0370bec37505127ca7492b30e91a59e5
parent50cf660567d2178f843df4f8ea7a3f2b9f60000e (diff)
add date validation message
-rw-r--r--src/app.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/app.rs b/src/app.rs
index 06d96e2..f4ce318 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -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()
+ )
}
}