blob: 3ff4e3cb22bfd2b6b73f585dc0dda902c4ad415a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
namespace Kanboard\Validator;
use SimpleValidator\Validator;
use SimpleValidator\Validators;
class PredefinedTaskDescriptionValidator extends BaseValidator
{
public function validate(array $values)
{
$v = new Validator($values, array(
new Validators\Required('title', t('This value is required')),
new Validators\Required('description', t('This value is required')),
));
return array(
$v->execute(),
$v->getErrors()
);
}
}
|