Setting Error Messages

All of the native error messages are located in the following language file: system/language/english/form_validation_lang.php

To set your own global custom message for a rule, you can either extend/override the language file by creating your own inapplication/language/english/form_validation_lang.php (read more about this in the Language Class documentation), or use the following method:

If you need to set a custom error message for a particular field on some particular rule, use the set_rules() method:

Where rule corresponds to the name of a particular rule, and Error Message is the text you would like displayed.

If you’d like to include a field’s “human” name, or the optional parameter some rules allow for (such as max_length), you can add the {field} and {param} tags to your message, respectively: