Commands - done

- The 'done' command now functional.
- Localized CmdDone.cpp.
This commit is contained in:
Paul Beckingham 2011-06-26 23:28:21 -04:00
parent 1b90adc1aa
commit 877ecbc864
6 changed files with 54 additions and 48 deletions

View file

@ -881,10 +881,14 @@ void Task::substitute (
void Task::validate () const
{
// Every task needs an ID, entry and description attribute.
if (!has ("uuid") ||
!has ("entry") ||
!has ("description"))
throw std::string ("A task must have a description in order to be valid.");
if (!has ("uuid"))
throw std::string ("A task must have a UUID.");
if (!has ("entry"))
throw std::string ("A task must have an entry timestamp.");
if (!has ("description"))
throw std::string ("A task must have a description.");
if (get ("description") == "") // No i18n
throw std::string ("Cannot add a task that is blank, or contains <CR> or <LF> characters.");