Welcome Guest, Not a member yet? Register   Sign In
Set Message With strtolower('{field}') not working

I am trying to make the {field} display in lower case in set message but has first letter upper case.

PHP Code:
$this->form_validation->set_message('is_unique''This ' strtolower('{field}') . ' all ready exists please choose another!'); 
There's only one rule - please don't tell anyone to go and read the manual.  Sometimes the manual just SUCKS!

This is because the php strtolower is being applied to 'field' before the field is then replaced with the provided field name.

Is it not possible to just lowercase your filed name in the set rules. Alternatively just remove 'This ' from the message and it will still read well.

Instead of: This Section already exists, please choose another.
Use: Section already exists. Please choose another.

Hope that helps,


Theme © iAndrew 2016 - Forum software by © MyBB