Библиотека для cis, online, cms1
This commit is contained in:
commit
3c2e614d87
269 changed files with 39854 additions and 0 deletions
41
core/validator/rule/abstract.php
Normal file
41
core/validator/rule/abstract.php
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
abstract class Rule_Abstract
|
||||
{
|
||||
public $field;
|
||||
protected $errorMsg;
|
||||
protected $ctx;
|
||||
|
||||
public function __construct($field, $errorMsg)
|
||||
{
|
||||
$this->field = $field;
|
||||
$this->errorMsg = $errorMsg;
|
||||
}
|
||||
|
||||
public function setName($field)
|
||||
{
|
||||
$this->field = $field;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setErrorMsg($errorMsg)
|
||||
{
|
||||
$this->errorMsg = $errorMsg;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getErrorMsg()
|
||||
{
|
||||
return $this->errorMsg;
|
||||
}
|
||||
|
||||
public function isValid(Collection $container, $status = null)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
public function setContext($ctx)
|
||||
{
|
||||
$this->ctx = $ctx;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue