diff options
Diffstat (limited to 'models/task.php')
-rw-r--r-- | models/task.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/models/task.php b/models/task.php index e542e8e0..77c620c8 100644 --- a/models/task.php +++ b/models/task.php @@ -192,6 +192,20 @@ class Task extends Base ); } + public function validateDescriptionCreation(array $values) + { + $v = new Validator($values, array( + new Validators\Required('id', t('The id is required')), + new Validators\Integer('id', t('This value must be an integer')), + new Validators\Required('description', t('The description is required')), + )); + + return array( + $v->execute(), + $v->getErrors() + ); + } + public function validateModification(array $values) { $v = new Validator($values, array( |