Welcome Guest, Not a member yet? Register   Sign In
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

(This post was last modified: 04-14-2017, 09:08 AM by nskarl.)

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




Theme © iAndrew 2016 - Forum software by © MyBB