public function validatorLongWords ( $attribute )
{
$parts = explode( ' ', $this->$attribute );
foreach ( $parts as $word ) {
if ( strlen( $word ) > static::LONG_WORD ) { # Для UTF-8 и русского текста используем mb_strlen( $word )
$this->addError( $attribute, 'Слишком длинное слово в строке, да...' );
break; # или return;
}
}
}
; Maximum allowed size for uploaded files.
upload_max_filesize = 40M
; Must be greater than or equal to upload_max_filesize
post_max_size = 40M