Частичная синхронизация с CMS

This commit is contained in:
origami11 2017-02-17 16:22:44 +03:00
parent 312f18a20a
commit b26e521657
62 changed files with 827 additions and 5992 deletions

View file

@ -0,0 +1,14 @@
<?php
class Validator_Rule_FileName extends Validator_Rule_Abstract {
public function getErrorMsg()
{
return 'Название файла может содержать только символы латиницы в нижнем регистре и цифры';
}
public function isValid(Collection $container, $status = null)
{
return Path::isName($container->get($this->field));
}
}

View file

@ -1,5 +1,7 @@
<?php
///<reference path="rule/notnull.php"/>
/**
* Проверка коллекции
*/
@ -66,8 +68,7 @@ class Validator_Validator
}
}
public function addRule(&$rule)
{
public function addRule(/*.any.*/&$rule) {
if (is_array($rule)) {
$this->chain = array_merge($this->chain, $rule);
} else {