protected function value_in_format($value, $format) {

		if($format === '*') return true;

		$formats = explode(',', $format);

		foreach($formats as $format) {

			if(ctype_digit($format)) {
				if($value === (int) $format) return true;
				continue;
			}

			$values = $this->expand_format_expression($format);
			if(in_array($value, $values)) return true;

		}

		return false;

	}
protected function value_in_format($value, $format) {

		if($format === '*') return true;

		$formats = explode(',', $format);

		foreach($formats as $format) {

			if(ctype_digit($format)) {
				if($value === (int) $format) return true;
				continue;
			}

			$values = $this->expand_format_expression($format);
			if(in_array($value, $values)) return true;

		}

		return false;

	}
protected function value_in_format ( $ value , $ format ) { if ( $ format === '*' ) return true ; $ formats = explode ( ',' , $ format ) ; foreach ( $ formats as $ format ) { if ( ctype_digit ( $ format ) ) { if ( $ value === ( int ) $ format ) return true ; continue ; } $ values = $ this -> expand_format_expression ( $ format ) ; if ( in_array ( $ value , $ values ) ) return true ; } return false ; }
Actually detect if value satisifes format

@param string Input value
@param string Field format
@return bool True if satisfied
@author Luke Lanchester
Actually detect if value satisifes format