PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 5.1
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v5.1
6.35 6.34 6.33.1 6.33 6.32.1 6.32 6.31 6.25 6.25.1 6.26 6.26.1 6.27 6.28 6.29 6.3 6.3.1 6.3.2 6.30 6.4 6.4.1 6.4.2 6.5 6.5.1 6.5.2 6.5.3 All 141 releases
← All changes | classes/models/fields/FrmFieldEmail.php +3 -14 6.255.1 View file →
@@ -12,8 +12,9 @@
12 12 * @var string
13 13 * @since 3.0
14 14 */
15 15 protected $type = 'email';
16 + protected $display_type = 'text';
16 17
17 18 /**
18 19 * @var bool
19 20 * @since 3.0
@@ -19,16 +20,8 @@
19 20 * @since 3.0
20 21 */
21 22 protected $holds_email_values = true;
22 23
23 - /**
24 - * @var bool
25 - */
26 - protected $array_allowed = false;
27 -
28 - /**
29 - * @return bool[]
30 - */
31 24 protected function field_settings_for_type() {
32 25 return array(
33 26 'size' => true,
34 27 'clear_on_focus' => true,
@@ -43,22 +36,18 @@
43 36 *
44 37 * @return array
45 38 */
46 39 public function validate( $args ) {
47 - if ( ! $args['value'] ) {
48 - return array();
49 - }
50 40 $errors = array();
51 - if ( false !== strpos( $args['value'], '.@' ) || ! is_email( $args['value'] ) ) {
41 + if ( $args['value'] != '' && ! is_email( $args['value'] ) ) {
52 42 $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $this->field, 'invalid' );
53 43 }
44 +
54 45 return $errors;
55 46 }
56 47
57 48 /**
58 49 * @since 4.0.04
59 - *
60 - * @return void
61 50 */
62 51 public function sanitize_value( &$value ) {
63 52 FrmAppHelper::sanitize_value( 'sanitize_email', $value );
64 53 }