public function __construct(array $rules = array(), array $default = array(), $type = null)
{
$this->_type = $type;
$this->_default = $default;
// prepare rules
$this->_rules = array_change_key_case((array) $rules, CASE_LOWER);
foreach ($this->_rules as $key => $item) {
$this->_rules[$key] = array_merge($default, (array) $item);
}
}