Added Valid and enabled Form::select sorting

This commit is contained in:
Deon George
2013-11-27 11:24:47 +11:00
parent 1ec370f07a
commit c132357630
4 changed files with 39 additions and 0 deletions

25
classes/lnApp/Valid.php Normal file
View File

@@ -0,0 +1,25 @@
<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* This class extends Kohana's Valid
*
* @package lnApp
* @category Modifications
* @author Deon George
* @copyright (c) 2010 Deon George
* @license http://dev.leenooks.net/license.html
*/
abstract class lnApp_Valid extends Kohana_Valid {
/**
* Checks that a value is not equal to another list of values
*
* @param string $value value
* @param array $list List of Values that shouldnt equal
* @return boolean
*/
public static function not_equal($value, array $list)
{
return ! in_array($value,$list);
}
}
?>