• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Validation min_length and max_length issue

#1
Hi all!

\Config\Validation.php

PHP Code:
public $validateForm = [
 
       'name'        => 'required|min_length[4]|trim',
]; 

Controller:
$this->validation->run($this->request->getPost(), 'validateForm');

Error:
Call to undefined function CodeIgniter\Validation\mb_strlen()
BASEPATH/Validation/Rules.php at line 259


same error if use max_length
Reply

#2
Looks like you are running a PHP version that does not have the mb_strlen() function available
Reply

#3
thanks for answer

PHP Version 7.0.18-1+deb.sury.org~trusty+1

Apache Version Apache/2.4.7 (Ubuntu)
Reply

#4
Are you sure mb_strlen() has been enabled?

You can check by using phpinfo()
Reply

#5
yep, it looks like it's not enabled, no info about mb_ in phpinfo
thanks for help, man!
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2017 MyBB Group.