$value) { $rules = array( new Validators\Required('id', t('The task time tracking id is required')), new Validators\Date('start', t('Invalid date'), $this->dateParser->getParserFormats()), new Validators\Date('end', t('Invalid date'), $this->dateParser->getParserFormats()), ); $v = new Validator($value, $rules); $valids[$key] = $v->execute(); $errors[$key] = $v->getErrors(); } return array( $valids, $errors ); } }