| @@ -9,9 +9,8 @@ | ||
| 9 | 9 | class FrmFieldText extends FrmFieldType { |
| 10 | 10 | |
| 11 | 11 | /** |
| 12 | 12 | * @var string |
| 13 | - * | |
| 14 | 13 | * @since 3.0 |
| 15 | 14 | */ |
| 16 | 15 | protected $type = 'text'; |
| 17 | 16 | |
| @@ -16,9 +15,8 @@ | ||
| 16 | 15 | protected $type = 'text'; |
| 17 | 16 | |
| 18 | 17 | /** |
| 19 | 18 | * @var bool |
| 20 | - * | |
| 21 | 19 | * @since 3.0 |
| 22 | 20 | */ |
| 23 | 21 | protected $holds_email_values = true; |
| 24 | 22 | |
| @@ -38,16 +36,13 @@ | ||
| 38 | 36 | 'invalid' => true, |
| 39 | 37 | ); |
| 40 | 38 | } |
| 41 | 39 | |
| 42 | - /** | |
| 43 | - * @param array $args | |
| 44 | - */ | |
| 45 | 40 | public function validate( $args ) { |
| 46 | 41 | $errors = parent::validate( $args ); |
| 47 | 42 | $max_length = intval( FrmField::get_option( $this->field, 'max' ) ); |
| 48 | 43 | |
| 49 | - if ( $max_length && FrmAppHelper::mb_function( array( 'mb_strlen', 'strlen' ), array( $args['value'] ) ) > $max_length ) { | |
| 44 | + if ( $max_length && strlen( $args['value'] ) > $max_length ) { | |
| 50 | 45 | $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); |
| 51 | 46 | } |
| 52 | 47 | |
| 53 | 48 | return $errors; |