PluginProbe
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More / 6.21
Formidable Forms – WordPress Form Builder for Contact Forms, Calculators, Quizzes & More v6.21
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/FrmEntryValidate.php +244 -111 6.56.21 View file →
@@ -5,10 +5,17 @@
5 5
6 6 class FrmEntryValidate {
7 7
8 8 /**
9 + * @since 6.17
10 + *
11 + * @var array|null
12 + */
13 + private static $name_text_fields;
14 +
15 + /**
9 16 * @param array $values
10 - * @param string[]|bool $exclude
17 + * @param bool|string[] $exclude
11 18 * @return array
12 19 */
13 20 public static function validate( $values, $exclude = false ) {
14 21 FrmEntry::sanitize_entry_post( $values );
@@ -24,8 +31,9 @@
24 31 $frm_settings = FrmAppHelper::get_settings();
25 32 $errors['form'] = $frm_settings->admin_permission;
26 33 }
27 34
35 + self::maybe_fix_item_meta();
28 36 self::set_item_key( $values );
29 37
30 38 $posted_fields = self::get_fields_to_validate( $values, $exclude );
31 39
@@ -54,14 +62,29 @@
54 62
55 63 if ( is_array( $filtered_errors ) ) {
56 64 $errors = $filtered_errors;
57 65 } else {
58 - _doing_it_wrong( __FUNCTION__, 'Only arrays should be returned when using the frm_validate_entry filter.', '6.3' );
66 + _doing_it_wrong( __METHOD__, 'Only arrays should be returned when using the frm_validate_entry filter.', '6.3' );
59 67 }
60 68
61 69 return $errors;
62 70 }
63 71
72 + /**
73 + * In case $_POST['item_meta'] is not an array, change it to an empty array.
74 + * This helps to avoid some warnings and errors when $_POST['item_meta'] is updated.
75 + *
76 + * @since 6.6
77 + *
78 + * @return void
79 + */
80 + private static function maybe_fix_item_meta() {
81 + // phpcs:ignore WordPress.Security.NonceVerification.Missing, WordPress.Security.ValidatedSanitizedInput.InputNotValidated
82 + if ( ! isset( $_POST['item_meta'] ) || ! is_array( $_POST['item_meta'] ) ) {
83 + $_POST['item_meta'] = array();
84 + }
85 + }
86 +
64 87 private static function set_item_key( &$values ) {
65 88 if ( ! isset( $values['item_key'] ) || $values['item_key'] == '' ) {
66 89 global $wpdb;
67 90 $values['item_key'] = FrmAppHelper::get_unique_key( '', $wpdb->prefix . 'frm_items', 'item_key' );
@@ -95,13 +118,17 @@
95 118
96 119 public static function validate_field( $posted_field, &$errors, $values, $args = array() ) {
97 120 $defaults = array(
98 121 'id' => $posted_field->id,
99 - 'parent_field_id' => '', // the id of the repeat or embed form
100 - 'key_pointer' => '', // the pointer in the posted array
101 - 'exclude' => array(), // exclude these field types from validation
122 + // The id of the repeat or embed form.
123 + 'parent_field_id' => '',
124 + // The pointer in the posted array.
125 + 'key_pointer' => '',
126 + // Exclude these field types from validation.
127 + 'exclude' => array(),
128 +
102 129 );
103 - $args = wp_parse_args( $args, $defaults );
130 + $args = wp_parse_args( $args, $defaults );
104 131
105 132 if ( empty( $args['parent_field_id'] ) ) {
106 133 $value = isset( $values['item_meta'][ $args['id'] ] ) ? $values['item_meta'][ $args['id'] ] : '';
107 134 } else {
@@ -130,8 +157,9 @@
130 157 }
131 158
132 159 FrmEntriesHelper::set_posted_value( $posted_field, $value, $args );
133 160
161 + self::validate_options( $errors, $posted_field, $value, $args );
134 162 self::validate_field_types( $errors, $posted_field, $value, $args );
135 163
136 164 // Field might want to modify value before other parts of the system
137 165 // e.g. trim off excess values like in the case of fields with limit.
@@ -142,16 +170,128 @@
142 170 }
143 171
144 172 $errors = apply_filters( 'frm_validate_' . $posted_field->type . '_field_entry', $errors, $posted_field, $value, $args );
145 173 $errors = apply_filters( 'frm_validate_field_entry', $errors, $posted_field, $value, $args );
174 +
175 + if ( ! FrmAppHelper::pro_is_installed() && empty( $args['other'] ) ) {
176 + FrmEntriesHelper::get_posted_value( $posted_field, $value, $args );
177 + }
146 178 }
147 179
148 180 /**
181 + * @since 6.21
182 + *
183 + * @param array $errors
184 + * @param object $posted_field
185 + * @param array|string $value
186 + * @param array $args
187 + *
188 + * @return void
189 + */
190 + private static function validate_options( &$errors, $posted_field, $value, $args ) {
191 + if ( empty( $posted_field->options ) ) {
192 + return;
193 + }
194 +
195 + $option_is_valid = self::option_is_valid( $posted_field, $value, $posted_field->options );
196 +
197 + /**
198 + * @since 6.21
199 + *
200 + * @param bool $option_is_valid
201 + * @param array|string $value
202 + * @param object $field
203 + */
204 + $option_is_valid = (bool) apply_filters( 'frm_option_is_valid', $option_is_valid, $value, $posted_field );
205 +
206 + if ( ! $option_is_valid ) {
207 + $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $posted_field, 'invalid' );
208 + }
209 + }
210 +
211 + /**
212 + * Validate that value matches one of the options for the field.
213 + *
214 + * @since 6.21
215 + *
216 + * @param stdClass $field
217 + * @param array|string $value
218 + * @param array $options
219 + * @return bool
220 + */
221 + private static function option_is_valid( $field, $value, $options ) {
222 + if ( '' === $value ) {
223 + return true;
224 + }
225 +
226 + if ( in_array( $field->type, array( 'likert', 'ranking' ), true ) ) {
227 + // Ignore these field types automatically.
228 + return true;
229 + }
230 +
231 + $value = (array) $value;
232 +
233 + foreach ( $value as $current_value ) {
234 + $match = false;
235 +
236 + foreach ( $options as $key => $option ) {
237 + if ( strpos( $key, 'other_' ) === 0 ) {
238 + // Always return true if an other option is found.
239 + return true;
240 + }
241 +
242 + $option_value = is_array( $option ) ? $option['value'] : $option;
243 + $match = $current_value === $option_value;
244 + if ( $match ) {
245 + break;
246 + }
247 +
248 + if ( is_numeric( $current_value ) ) {
249 + $match = (int) $current_value === (int) $option_value;
250 + if ( $match ) {
251 + break;
252 + }
253 + }
254 + }
255 +
256 + if ( ! $match ) {
257 + return self::options_are_dynamic_based_on_hook( $field, $value );
258 + }
259 + }//end foreach
260 +
261 + return true;
262 + }
263 +
264 + /**
265 + * Do not validate options if they have been modified with a hook.
266 + * This is to help avoid issues where the options could be based on a URL param for example.
267 + *
268 + * @since 6.21
269 + *
270 + * @return bool
271 + */
272 + private static function options_are_dynamic_based_on_hook( $field_object, $value ) {
273 + $values = (array) $field_object;
274 + $values['value'] = $value;
275 + FrmFieldsHelper::prepare_new_front_field( $values, $field_object );
276 +
277 + $map_callback = function ( $option ) {
278 + return is_array( $option ) ? $option['value'] : $option;
279 + };
280 +
281 + $values_options = array_map( $map_callback, $values['options'] );
282 + $field_object_options = array_map( $map_callback, $field_object->options );
283 +
284 + return $values_options !== $field_object_options;
285 + }
286 +
287 + /**
149 288 * Maybe add item_name to $_POST to save it in items table.
150 289 *
151 290 * @since 5.2.02
152 291 *
153 - * @param object $field Field object.
292 + * @param array|string $value Field value.
293 + * @param object $field Field object.
154 294 */
155 295 private static function maybe_add_item_name( $value, $field ) {
156 296 $item_name = false;
157 297 if ( 'name' === $field->type ) {
@@ -195,10 +335,11 @@
195 335 }
196 336 }
197 337
198 338 public static function validate_phone_field( &$errors, $field, $value, $args ) {
199 - if ( $field->type == 'phone' || ( $field->type == 'text' && FrmField::is_option_true_in_object( $field, 'format' ) ) ) {
339 + $format_value = FrmField::get_option( $field, 'format' );
200 340
341 + if ( $field->type === 'phone' || ( $field->type === 'text' && $format_value && ! FrmCurrencyHelper::is_currency_format( $format_value ) ) ) {
201 342 $pattern = self::phone_format( $field );
202 343
203 344 if ( ! preg_match( $pattern, $value ) ) {
204 345 $errors[ 'field' . $args['id'] ] = FrmFieldsHelper::get_error_msg( $field, 'invalid' );
@@ -212,8 +353,11 @@
212 353 } else {
213 354 $pattern = FrmField::get_option( $field, 'format' );
214 355 }
215 356
357 + // Ampersands are saved as &.
358 + // Reverse it here so we are checking for the correct character.
359 + $pattern = html_entity_decode( $pattern );
216 360 $pattern = apply_filters( 'frm_phone_pattern', $pattern, $field );
217 361
218 362 // Create a regexp if format is not already a regexp
219 363 if ( strpos( $pattern, '^' ) !== 0 ) {
@@ -270,27 +414,31 @@
270 414 return $pattern;
271 415 }
272 416
273 417 /**
274 - * Check for spam
418 + * Check for spam.
275 419 *
276 - * @param boolean $exclude
420 + * @param bool $exclude
277 421 * @param array $values
278 - * @param array $errors by reference
422 + * @param array $errors By reference.
279 423 */
280 424 public static function spam_check( $exclude, $values, &$errors ) {
281 - if ( ! empty( $exclude ) || ! isset( $values['item_meta'] ) || empty( $values['item_meta'] ) || ! empty( $errors ) ) {
425 + if ( ! empty( $exclude ) || empty( $values['item_meta'] ) || ! empty( $errors ) ) {
282 426 // only check spam if there are no other errors
283 427 return;
284 428 }
285 429
286 430 $antispam_check = self::is_antispam_check( $values['form_id'] );
431 + $spam_msg = FrmAntiSpamController::get_default_spam_message();
287 432 if ( is_string( $antispam_check ) ) {
288 433 $errors['spam'] = $antispam_check;
289 434 } elseif ( self::is_honeypot_spam( $values ) || self::is_spam_bot() ) {
290 - $errors['spam'] = __( 'Your entry appears to be spam!', 'formidable' );
291 - } elseif ( self::blacklist_check( $values ) ) {
292 - $errors['spam'] = __( 'Your entry appears to be blocked spam!', 'formidable' );
435 + $errors['spam'] = $spam_msg;
436 + } else {
437 + $is_spam = FrmAntiSpamController::is_spam( $values );
438 + if ( $is_spam ) {
439 + $errors['spam'] = $is_spam;
440 + }
293 441 }
294 442
295 443 if ( isset( $errors['spam'] ) || self::form_is_in_progress( $values ) ) {
296 444 return;
@@ -326,9 +474,9 @@
326 474 }
327 475
328 476 /**
329 477 * @param array $values
330 - * @return boolean
478 + * @return bool
331 479 */
332 480 private static function is_honeypot_spam( $values ) {
333 481 $honeypot = new FrmHoneypot( $values['form_id'] );
334 482 return ! $honeypot->validate();
@@ -334,9 +482,9 @@
334 482 return ! $honeypot->validate();
335 483 }
336 484
337 485 /**
338 - * @return boolean
486 + * @return bool
339 487 */
340 488 private static function is_spam_bot() {
341 489 $ip = FrmAppHelper::get_ip_address();
342 490
@@ -344,9 +492,9 @@
344 492 }
345 493
346 494 /**
347 495 * @param array $values
348 - * @return boolean
496 + * @return bool
349 497 */
350 498 private static function is_akismet_spam( $values ) {
351 499 global $wpcom_api_key;
352 500
@@ -362,59 +510,23 @@
362 510
363 511 return ( ! empty( $form->options['akismet'] ) && ( $form->options['akismet'] !== 'logged' || ! is_user_logged_in() ) );
364 512 }
365 513
366 - public static function blacklist_check( $values ) {
367 - if ( ! apply_filters( 'frm_check_blacklist', true, $values ) ) {
368 - return false;
369 - }
370 -
371 - $mod_keys = trim( self::get_disallowed_words() );
372 - if ( empty( $mod_keys ) ) {
373 - return false;
374 - }
375 -
376 - $content = FrmEntriesHelper::entry_array_to_string( $values );
377 -
378 - self::prepare_values_for_spam_check( $values );
379 - $ip = FrmAppHelper::get_ip_address();
380 - $user_agent = FrmAppHelper::get_server_value( 'HTTP_USER_AGENT' );
381 - $user_info = self::get_spam_check_user_info( $values );
382 -
383 - return self::check_disallowed_words( $user_info['comment_author'], $user_info['comment_author_email'], $user_info['comment_author_url'], $content, $ip, $user_agent );
384 - }
385 -
386 514 /**
387 - * For WP 5.5 compatibility.
515 + * Checks spam using WordPress disallowed words and Frm denylist.
388 516 *
389 - * @since 4.06.02
390 - */
391 - private static function check_disallowed_words( $author, $email, $url, $content, $ip, $user_agent ) {
392 - if ( function_exists( 'wp_check_comment_disallowed_list' ) ) {
393 - return wp_check_comment_disallowed_list( $author, $email, $url, $content, $ip, $user_agent );
394 - } else {
395 - return wp_blacklist_check( $author, $email, $url, $content, $ip, $user_agent );
396 - }
397 - }
398 -
399 - /**
400 - * For WP 5.5 compatibility.
517 + * @param array $values Entry values.
401 518 *
402 - * @since 4.06.02
519 + * @return bool
403 520 */
404 - private static function get_disallowed_words() {
405 - $keys = get_option( 'disallowed_keys' );
406 - if ( false === $keys ) {
407 - // Fallback for WP < 5.5.
408 - $keys = get_option( 'blacklist_keys' );
409 - }
410 - return $keys;
521 + public static function blacklist_check( $values ) {
522 + return FrmAntiSpamController::contains_wp_disallowed_words( $values ) || FrmAntiSpamController::is_denylist_spam( $values );
411 523 }
412 524
413 525 /**
414 526 * Check entries for Akismet spam
415 527 *
416 - * @return boolean true if is spam
528 + * @return bool true if is spam
417 529 */
418 530 public static function akismet( $values ) {
419 531 if ( empty( $values['item_meta'] ) ) {
420 532 return false;
@@ -436,9 +548,9 @@
436 548
437 549 $query_string = _http_build_query( $datas, '', '&' );
438 550 $response = Akismet::http_post( $query_string, 'comment-check' );
439 551
440 - return ( is_array( $response ) && $response[1] == 'true' );
552 + return ( is_array( $response ) && $response[1] === 'true' );
441 553 }
442 554
443 555 /**
444 556 * @since 2.0
@@ -447,8 +559,9 @@
447 559 self::add_site_info_to_akismet( $datas );
448 560 self::add_server_values_to_akismet( $datas );
449 561
450 562 self::prepare_values_for_spam_check( $values );
563 + self::skip_adding_values_to_akismet( $values );
451 564
452 565 self::add_user_info_to_akismet( $datas, $values );
453 566 self::add_comment_content_to_akismet( $datas, $values );
454 567 }
@@ -478,13 +591,14 @@
478 591 /**
479 592 * Gets user info for Akismet spam check.
480 593 *
481 594 * @since 5.0.13 Separate code for guest. Handle value of embedded|repeater.
595 + * @since 6.21 This changed from private to public.
482 596 *
483 597 * @param array $values Entry values after running through {@see FrmEntryValidate::prepare_values_for_spam_check()}.
484 598 * @return array
485 599 */
486 - private static function get_spam_check_user_info( $values ) {
600 + public static function get_spam_check_user_info( $values ) {
487 601 if ( ! is_user_logged_in() ) {
488 602 return self::get_spam_check_user_info_for_guest( $values );
489 603 }
490 604
@@ -541,9 +655,10 @@
541 655 */
542 656 private static function recursive_add_akismet_guest_info( &$datas, $values, $custom_index = null ) {
543 657 foreach ( $values as $index => $value ) {
544 658 if ( ! $datas['missing_keys'] ) {
545 - return; // Found all info.
659 + // Found all info.
660 + return;
546 661 }
547 662
548 663 if ( is_array( $value ) ) {
549 664 self::recursive_add_akismet_guest_info( $datas, $value, $index );
@@ -551,9 +666,9 @@
551 666 }
552 667
553 668 $field_id = ! is_null( $custom_index ) ? $custom_index : $index;
554 669 foreach ( $datas['missing_keys'] as $key_index => $key ) {
555 - $found = self::is_akismet_guest_info_value( $key, $value, $field_id, $datas['name_field_ids'] );
670 + $found = self::is_akismet_guest_info_value( $key, $value, $field_id, $datas['name_field_ids'], $values );
556 671 if ( $found ) {
557 672 $datas[ $key ] = $value;
558 673 $datas['frm_duplicated'][] = $field_id;
559 674 unset( $datas['missing_keys'][ $key_index ] );
@@ -558,9 +673,9 @@
558 673 $datas['frm_duplicated'][] = $field_id;
559 674 unset( $datas['missing_keys'][ $key_index ] );
560 675 }
561 676 }
562 - }
677 + }//end foreach
563 678 }
564 679
565 680 /**
566 681 * Checks if given value is an akismet guest info.
@@ -570,11 +685,13 @@
570 685 * @param string $key Guest info key.
571 686 * @param string $value Value to check.
572 687 * @param int $field_id Field ID.
573 688 * @param array $name_field_ids Name field IDs.
689 + * @param array $values Array of posted values.
690 + *
574 691 * @return bool
575 692 */
576 - private static function is_akismet_guest_info_value( $key, $value, $field_id, $name_field_ids ) {
693 + private static function is_akismet_guest_info_value( $key, &$value, $field_id, $name_field_ids, $values ) {
577 694 if ( ! $value || is_numeric( $value ) ) {
578 695 return false;
579 696 }
580 697
@@ -585,16 +702,60 @@
585 702 case 'comment_author_url':
586 703 return 0 === strpos( $value, 'http' );
587 704
588 705 case 'comment_author':
589 - if ( $name_field_ids ) {
706 + if ( $name_field_ids && in_array( $field_id, $name_field_ids, true ) ) {
590 707 // If there is name field in the form, we should always use it as author name.
591 - return in_array( $field_id, $name_field_ids, true );
708 + return true;
592 709 }
593 - return strlen( $value ) < 200;
710 + $form_id = FrmAppHelper::get_post_param( 'form_id', 0, 'absint' );
711 + $fields = self::get_name_text_fields( $form_id );
712 +
713 + foreach ( $fields as $index => $field ) {
714 + if ( 'Name' !== $field->name ) {
715 + continue;
716 + }
717 + if ( isset( $fields[ $index + 1 ] ) && 'Last' === $fields[ $index + 1 ]->name ) {
718 + if ( empty( $values[ absint( $fields[ $index + 1 ]->id ) ] ) ) {
719 + continue;
720 + }
721 + $value .= ' ' . $values[ $fields[ $index + 1 ]->id ];
722 + return true;
723 + }
724 + }
725 + }//end switch
726 +
727 + return false;
728 + }
729 +
730 + /**
731 + * Returns fields that have 'Name' and 'Last' as their name.
732 + *
733 + * @since 6.17
734 + *
735 + * @param int $form_id
736 + * @return array
737 + */
738 + private static function get_name_text_fields( $form_id ) {
739 + $name_text_fields_is_initialized = is_array( self::$name_text_fields );
740 + if ( $name_text_fields_is_initialized && isset( self::$name_text_fields[ $form_id ] ) ) {
741 + return self::$name_text_fields[ $form_id ];
594 742 }
743 + if ( ! $name_text_fields_is_initialized ) {
744 + self::$name_text_fields = array();
745 + }
746 + self::$name_text_fields[ $form_id ] = FrmDb::get_results(
747 + 'frm_fields',
748 + array(
749 + 'form_id' => $form_id,
750 + 'type' => 'text',
751 + 'name' => array( 'Name', 'Last' ),
752 + ),
753 + 'id,name',
754 + array( 'order_by' => 'field_order ASC' )
755 + );
595 756
596 - return false;
757 + return self::$name_text_fields[ $form_id ];
597 758 }
598 759
599 760 private static function add_server_values_to_akismet( &$datas ) {
600 761 foreach ( $_SERVER as $key => $value ) {
@@ -627,10 +788,8 @@
627 788 }
628 789 unset( $datas['frm_duplicated'] );
629 790 }
630 791
631 - self::skip_adding_values_to_akismet( $values );
632 -
633 792 $datas['comment_content'] = FrmEntriesHelper::entry_array_to_string( $values );
634 793 }
635 794
636 795 /**
@@ -665,14 +824,16 @@
665 824 * @param array $values Entry values.
666 825 * @return bool
667 826 */
668 827 private static function should_really_skip_field( $field_data, $values ) {
669 - if ( empty( $field_data->options ) ) { // This is skipped field types.
828 + if ( empty( $field_data->options ) ) {
829 + // This is skipped field types.
670 830 return true;
671 831 }
672 832
673 833 FrmAppHelper::unserialize_or_decode( $field_data->options );
674 - if ( ! $field_data->options ) { // Check if an error happens when unserializing, or empty options.
834 + if ( ! $field_data->options ) {
835 + // Check if an error happens when unserializing, or empty options.
675 836 return true;
676 837 }
677 838
678 839 end( $field_data->options );
@@ -730,12 +891,13 @@
730 891 /**
731 892 * Prepares values array for spam check.
732 893 *
733 894 * @since 5.0.13
895 + * @since 6.21 This changed from private to public.
734 896 *
735 897 * @param array $values Entry values.
736 898 */
737 - private static function prepare_values_for_spam_check( &$values ) {
899 + public static function prepare_values_for_spam_check( &$values ) {
738 900 $form_ids = self::get_all_form_ids_and_flatten_meta( $values );
739 901 $values['form_ids'] = $form_ids;
740 902 }
741 903
@@ -754,9 +916,10 @@
754 916
755 917 // Blacklist check for File field in the old version doesn't contain `form_id`.
756 918 $form_ids = isset( $values['form_id'] ) ? array( absint( $values['form_id'] ) ) : array();
757 919 foreach ( $values['item_meta'] as $field_id => $value ) {
758 - if ( ! is_numeric( $field_id ) ) { // Maybe `other`.
920 + if ( ! is_numeric( $field_id ) ) {
921 + // Maybe `other`.
759 922 continue;
760 923 }
761 924
762 925 // Convert name array to string.
@@ -792,46 +955,16 @@
792 955
793 956 $values['name_field_ids'][] = $subsubindex;
794 957 }
795 958
796 - $values['item_meta'][ $subsubindex ][] = $subsubvalue;
959 + if ( is_array( $values['item_meta'][ $subsubindex ] ) ) {
960 + $values['item_meta'][ $subsubindex ][] = $subsubvalue;
961 + }
797 962 }
798 - }
963 + }//end foreach
799 964
800 965 unset( $values['item_meta'][ $field_id ] );
801 - }
966 + }//end foreach
802 967
803 968 return $form_ids;
804 - }
805 -
806 - /**
807 - * @deprecated 3.0
808 - * @codeCoverageIgnore
809 - */
810 - public static function validate_url_field( &$errors, $field, $value, $args ) {
811 - FrmDeprecated::validate_url_field( $errors, $field, $value, $args );
812 - }
813 -
814 - /**
815 - * @deprecated 3.0
816 - * @codeCoverageIgnore
817 - */
818 - public static function validate_email_field( &$errors, $field, $value, $args ) {
819 - FrmDeprecated::validate_email_field( $errors, $field, $value, $args );
820 - }
821 -
822 - /**
823 - * @deprecated 3.0
824 - * @codeCoverageIgnore
825 - */
826 - public static function validate_number_field( &$errors, $field, $value, $args ) {
827 - FrmDeprecated::validate_number_field( $errors, $field, $value, $args );
828 - }
829 -
830 - /**
831 - * @deprecated 3.0
832 - * @codeCoverageIgnore
833 - */
834 - public static function validate_recaptcha( &$errors, $field, $args ) {
835 - FrmDeprecated::validate_recaptcha( $errors, $field, $args );
836 969 }
837 970 }