diff --git a/src/Task.cpp b/src/Task.cpp index afef355b7..ada62cfb5 100644 --- a/src/Task.cpp +++ b/src/Task.cpp @@ -1091,6 +1091,7 @@ void Task::validate () const Date due (get_date ("due")); // Verify wait < due + // TODO Downgrade to warning. if (has ("wait")) { Date wait (get_date ("wait")); @@ -1100,6 +1101,7 @@ void Task::validate () const Date entry (get_date ("entry")); + // TODO Downgrade to warning. if (has ("start")) { Date start (get_date ("start")); @@ -1107,6 +1109,7 @@ void Task::validate () const throw std::string (STRING_TASK_VALID_START); } + // TODO Downgrade to warning. if (has ("end")) { Date end (get_date ("end")); @@ -1128,9 +1131,10 @@ void Task::validate () const { Duration d; if (! d.valid (get ("recur"))) - throw std::string (STRING_TASK_VALID_RECUR); + throw std::string (format (STRING_TASK_VALID_RECUR, get ("recur"))); } + // TODO Remove this restriction. if (has ("wait") && getStatus () == Task::recurring) throw std::string (STRING_TASK_VALID_WAIT_RECUR); diff --git a/src/en-US.h b/src/en-US.h index 971cf5fad..4748743cf 100644 --- a/src/en-US.h +++ b/src/en-US.h @@ -422,9 +422,9 @@ #define STRING_TASK_VALID_WAIT "A 'wait' date must be before a 'due' date." #define STRING_TASK_VALID_START "A 'start' date must be after an 'entry' date." #define STRING_TASK_VALID_END "An 'end' date must be after an 'entry' date." -#define STRING_TASK_VALID_REC_DUE "You cannot specify a recurring task without a due date." -#define STRING_TASK_VALID_UNTIL "You cannot specify an until date for a non-recurring task." -#define STRING_TASK_VALID_RECUR "A recurrence value must be valid." +#define STRING_TASK_VALID_REC_DUE "A recurring task must also have a 'due' date." +#define STRING_TASK_VALID_UNTIL "Only recurring tasks may have an 'until' date." +#define STRING_TASK_VALID_RECUR "The recurrence value '{1}' is not valid." #define STRING_TASK_VALID_WAIT_RECUR "You cannot create a task that is both waiting and recurring." #define STRING_TASK_VALID_PRIORITY "Priority values may be 'H', 'M' or 'L', not '{1}'."