EllisLab/CodeIgniter — pull request #961 by cryode (2012-01-24 07:16:25+00:00)
Title: Improved form validation rule error messages.

Added two keyword tags that can be added to form validation rule error messages to display the "human" field name and optional rule parameter, replacing the current sprintf method.

The sprintf method limits users who may want to use custom messages with only the rule parameter.

The related language file and user guide source file have been updated accordingly. I also removed the closing PHP tags from controller examples in the user guide, as promoting closing PHP tags is just asking for whitespace and broken applications.

I encourage anyone to recommend different tag names or strings, or any other thoughts on this pretty simple update.

$this->form_validation->set_message('min_length', 'The {field} field must have at least {param} characters.');