<?php defined('SYSPATH') or die('No direct access allowed.');
/**
* Array and variable validation.
*
* @package OSB
* @category Modifications
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
abstract class Valid extends Kohana_Valid {
* Checks if a field matches the value of another field, if it is set.
* Field is ignored if it is blank.
* @param array array of values
* @param string field name
* @param string field name to match
* @return boolean
public static function matches_ifset($array, $field, $match)
{
return isset($array[$match]) ? ($array[$field] === $array[$match]) : TRUE;
}
?>