protected function ajaxValidation(ValidationResult $result) { if (ee()->input->is_ajax_request()) { $field = ee()->input->post('ee_fv_field'); if ($result->hasErrors($field)) { return array('error' => $result->renderError($field)); } else { return array('success'); } } return NULL; }