Регистр файлов
This commit is contained in:
parent
4fd0187ea6
commit
c8958cbee0
83 changed files with 25 additions and 53 deletions
|
|
@ -1,29 +0,0 @@
|
|||
<?php
|
||||
|
||||
require_once 'abstract.php';
|
||||
|
||||
class Rule_Notnull extends Rule_Abstract
|
||||
{
|
||||
function skipEmpty() {
|
||||
return false;
|
||||
}
|
||||
|
||||
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 != '';
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue