label = $label; foreach($rules as $key => $rule) { $this->rules[$key] = $rule; } if ($messages) { foreach($messages as $key => $message) { $this->messages[$key] = $message; } } } }