Title: Validation and Submit Problems
Last modified: April 20, 2021

---

# Validation and Submit Problems

 *  Resolved [Medienopfer98](https://wordpress.org/support/users/medienopfer98/)
 * (@medienopfer98)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/validation-and-submit-problems/)
 * I work for a agency, who use ninja forms and must create a plugin. I have this
   in my actions constructor
 * `add_filter('ninja_forms_submit_data', array( $this, 'validate_minimum_nl_selects'));`
 * and this in the function
 *     ```
       $form_data['errors']['fields'][89] = esc_html__( 'Error', 'myplugin' );
       $form_data['errors']['fields'][91] = esc_html__( 'Error', 'myplugin' );
       $form_data['formErrorsCorrectErrors'] = esc_html__( 'Form Error', 'myplugin' );
       return $form_data;
       ```
   
 * Problem is, that the error is only shown at field 89. If i comment the line with
   89 then the error is shown at field 91. The formErrorsCorrectErrors is never 
   working, but i also want an error at the end of the form. Is it possible to show
   the errors on each field and change the main error message for the form?
 * I also have a problem that once a error is shown, i cant submit the form again.
   Hope somebody can help me, because i dont know where i should ask this question.

Viewing 1 replies (of 1 total)

 *  Thread Starter [Medienopfer98](https://wordpress.org/support/users/medienopfer98/)
 * (@medienopfer98)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/validation-and-submit-problems/#post-14345584)
 * I tested now both filters.
 * 1) ninja_forms_submit_data, which is called before send the data. The code is
   above.
 * 2) I also tried ninja_forms_pre_validate_field_settings and try to add [‘error’]
   to each of my fields. That causes also the same problem and the error message
   is missing.

Viewing 1 replies (of 1 total)

The topic ‘Validation and Submit Problems’ is closed to new replies.

 * ![](https://ps.w.org/ninja-forms/assets/icon-256x256.png?rev=1649747)
 * [Ninja Forms - The Contact Form Builder That Grows With You](https://wordpress.org/plugins/ninja-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ninja-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ninja-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/ninja-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ninja-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ninja-forms/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [Medienopfer98](https://wordpress.org/support/users/medienopfer98/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/validation-and-submit-problems/#post-14345584)
 * Status: resolved