| @@ -1,8 +1,5 @@ | ||
| 1 | 1 | <?php |
| 2 | -if ( ! defined( 'ABSPATH' ) ) { | |
| 3 | - die( 'You are not allowed to call this page directly.' ); | |
| 4 | -} | |
| 5 | 2 | |
| 6 | 3 | /** |
| 7 | 4 | * @since 3.0 |
| 8 | 5 | */ |
| @@ -19,16 +16,8 @@ | ||
| 19 | 16 | * @since 3.0 |
| 20 | 17 | */ |
| 21 | 18 | protected $holds_email_values = true; |
| 22 | 19 | |
| 23 | - /** | |
| 24 | - * @var bool | |
| 25 | - */ | |
| 26 | - protected $array_allowed = false; | |
| 27 | - | |
| 28 | - /** | |
| 29 | - * @return bool[] | |
| 30 | - */ | |
| 31 | 20 | protected function field_settings_for_type() { |
| 32 | 21 | return array( |
| 33 | 22 | 'size' => true, |
| 34 | 23 | 'clear_on_focus' => true, |
| @@ -34,17 +23,6 @@ | ||
| 34 | 23 | 'clear_on_focus' => true, |
| 35 | 24 | 'format' => true, |
| 36 | 25 | 'invalid' => true, |
| 37 | 26 | ); |
| 38 | - } | |
| 39 | - | |
| 40 | - public function validate( $args ) { | |
| 41 | - $errors = parent::validate( $args ); | |
| 42 | - $max_length = intval( FrmField::get_option( $this->field, 'max' ) ); | |
| 43 | - | |
| 44 | - if ( $max_length && strlen( $args['value'] ) > $max_length ) { | |
| 45 | - $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' ); | |
| 46 | - } | |
| 47 | - | |
| 48 | - return $errors; | |
| 49 | 27 | } |
| 50 | 28 | } |