Making min_ and max_length UTF-8 compatible

This commit is contained in:
Geert De Deckere 2009-06-14 10:44:40 +02:00 committed by Woody Gilk
parent 46d1b1dd9b
commit 44a982bf20

View file

@ -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;
}
/**