Библиотека для cis, online, cms1
This commit is contained in:
commit
3c2e614d87
269 changed files with 39854 additions and 0 deletions
20
core/validator/rule/alpha.php
Normal file
20
core/validator/rule/alpha.php
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
require_once 'abstract.php';
|
||||
|
||||
/**
|
||||
* Ïðîâåðêà íà ÷èñëî
|
||||
*/
|
||||
class Rule_Alpha extends Rule_Abstract
|
||||
{
|
||||
public function getErrorMsg()
|
||||
{
|
||||
return "Ïîëå äîëæíî ñîäåðæàòü òîëüêî áóêâû";
|
||||
}
|
||||
|
||||
public function isValid(Collection $container, $status = null)
|
||||
{
|
||||
return ctype_alpha($container->get($this->field));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue