Deprecated
This function has been deprecated.
ap_form_validation_error_response( object $validate )
Description #
Send ajax response if there is error in validation class.
Parameters #
- $validateobject (Required) Validation class.
Source #
File: includes/deprecated.php
function ap_form_validation_error_response( $validate ) { _deprecated_function( __FUNCTION__, '4.1.0' ); // If error in form then return. if ( $validate->have_error() ) { ap_ajax_json( array( 'success' => false, 'form' => $_POST['ap_form_action'], 'snackbar' => [ 'message' => __( 'Check missing fields and then re-submit.', 'anspress-question-answer' ), ], 'errors' => $validate->get_errors(), ) ); } }
Expand full source code Collapse full source code View on GitHub: includes/deprecated.php:24
Add your comment