Переделка для composer autoload

This commit is contained in:
origami11 2017-02-09 14:57:40 +03:00
parent ad69746347
commit b5641db607
100 changed files with 14 additions and 325 deletions

View file

@ -1,24 +0,0 @@
<?php
require_once 'abstract.php';
/**
* Проверка формата даты
*/
class Rule_Date extends Rule_Abstract
{
private $split = "\\/";
public function getErrorMsg()
{
return "Неверный формат даты";
}
public function isValid(Collection $container, $status = null)
{
$pattern = "/^([0-9]{1,2})\/([0-9]{1,2})\/([0-9]{4})$/";
return (preg_match($pattern, $container->get($this->field), $matches)
&& checkdate($matches[2], $matches[1], $matches[3]));
}
}