![]() |
I am using Docker.
When I run the project on local environment(windows 11), it gives validation error messages as The username field is required. The password field is required. But the same project on server(Linux) shows error messages as validation.required validation.required Both are running on PHP 8.3 and this is CI4 project This is the part of the code that use for form validation. $rules = [ 'username' => [ 'rules' => 'required|string|min_length[5]|max_length[30]', 'errors' => [ 'required' => lang('validation.required', ['field' => lang('users.usersInputUsername')]), ], ], 'password' => [ 'rules' => 'required|min_length[6]', 'errors' => [ 'required' => lang('validation.required', ['field' => lang('users.usersInputPassword')]), ], ] ]; if($this->validate($rules){ } Is there anyone who knows why is this occur?
The lang file name is Validation.php, not validation.php.
Therefore you must write lang('Validation.required', ... Read https://codeigniter.com/user_guide/outgo...calization (05-16-2024, 01:55 AM)kenjis Wrote: The lang file name is Validation.php, not validation.php.
The system has different case sensitivity. App != app
The case sensitivity depends on the file system you are using.
Probably you put the project files on the Windows file system that is case insensitive. |
Welcome Guest, Not a member yet? Register Sign In |