Библиотека для cis, online, cms1

This commit is contained in:
Фёдор Подлеснов 2016-06-29 18:51:32 +03:00
commit 3c2e614d87
269 changed files with 39854 additions and 0 deletions

View file

@ -0,0 +1,25 @@
<?php
require_once 'abstract.php';
class Rule_Notnull extends Rule_Abstract
{
public function getErrorMsg()
{
return "Ïîëå íå äîëæíî áûòü ïóñòûì";
}
public function isValid(Collection $container, $status = null)
{
$data = $container->get($this->field);
if (is_array($data)) {
foreach($data as $c) {
if (trim($c) != '') return true;
}
return false;
} else {
$value = trim($data);
return $value != '';
}
}
}