Making min_ and max_length UTF-8 compatible
This commit is contained in:
parent
46d1b1dd9b
commit
44a982bf20
|
@ -56,7 +56,7 @@ class Validate extends ArrayObject {
|
|||
*/
|
||||
public static function min_length($value, $length)
|
||||
{
|
||||
return strlen($value) >= $length;
|
||||
return utf8::strlen($value) >= $length;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -68,7 +68,7 @@ class Validate extends ArrayObject {
|
|||
*/
|
||||
public static function max_length($value, $length)
|
||||
{
|
||||
return strlen($value) <= $length;
|
||||
return utf8::strlen($value) <= $length;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue