Welcome Guest, Not a member yet? Register   Sign In
Error messages with the container %s
#1

[eluser]Unknown[/eluser]
If I set

Code:
$this->validation->set_message('required', " This is a test for %s!");

or just try to use error messages already set in validation_lang.php
I do not receive the expected result in the view file using printf or sprintf.

In the view file for
Code:
printf($error, "any string")
I get only " This is a test for !"
It behaves the same even in the controller.


Even for the codeigniter help example does not work
http://ellislab.com/codeigniter/user-gui...ation.html

Printing in view:

Code:
printf($this->validation->username_error, 'Username');
gives me back


Code:
'The field can not be the word "test"'

instead of

Code:
'The Username field can not be the word "test"'




Theme © iAndrew 2016 - Forum software by © MyBB