miniflux-legacy/app/validators/feed.php

22 lines
569 B
PHP
Raw Normal View History

2016-08-24 04:03:45 +02:00
<?php
namespace Miniflux\Validator\Feed;
use SimpleValidator\Validator;
use SimpleValidator\Validators;
function validate_modification(array $values)
{
$v = new Validator($values, array(
new Validators\Required('id', t('The feed id is required')),
new Validators\Required('title', t('The title is required')),
new Validators\Required('site_url', t('The site url is required')),
new Validators\Required('feed_url', t('The feed url is required')),
));
return array(
$v->execute(),
$v->getErrors(),
);
}