How to custom error messeger when set rules, ex: I want to replace "The %s field must contain a unique value." to "Trùng tên đăng nhập".
From page: http://ellislab.com/...l#settingerrors
Setting Error Messages
All of the native error messages are located in the following language file: language/english/form_validation_lang.php
To set your own custom message you can either edit that file, or use the following function:
$this->form_validation->set_message('rule', 'Error Message');
Where rule corresponds to the name of a particular rule, and Error Message is the text you would like displayed.
If you include %s in your error string, it will be replaced with the "human" name you used for your field when you set your rules.
In the "callback" example above, the error message was set by passing the name of the function:
You can also override any error message found in the language file. For example, to change the message for the "required" rule you will do this:
$this->form_validation->set_message('required', 'Your custom message here');