Title: Validate only when submit
Last modified: September 25, 2023

---

# Validate only when submit

 *  Resolved [exlipse](https://wordpress.org/support/users/exlipse/)
 * (@exlipse)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/validate-only-when-submit/)
 * Hello,
   Normally, if any input is marked as required and you proceed to the next
   action without entering data into this input (for example, selecting something
   from the next selectbox), a validation for the inputs is run and error messages
   appear.Is there a way to bypass this situation in some forms and only perform
   validations when the submit button is clicked?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/validate-only-when-submit/#post-17078721)
 * No, there isn’t. Just for reference, can you tell us why you want to do so?
 *  [rakosolapov](https://wordpress.org/support/users/rakosolapov/)
 * (@rakosolapov)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/validate-only-when-submit/#post-17079376)
 * Joining the thread, i think it should be an option to disable validation until
   the submit – on my forms there are *required marks already, i don’t want to treat
   my client as stupid, i believe he sees the *required marks.
 * With custom input number type field incrementor i’m experiencing a validation
   bug, see the video
 *  [https://streamable.com/r96gix](https://streamable.com/r96gix)
 * custom incrementor code looks like this:
 *     ```wp-block-code
       <button onclick="this.parentNode.querySelector('.incrementor').stepDown()">-</button>
         [number division-spots class:incrementor min:1 "1"]
       <button onclick="this.parentNode.querySelector('.incrementor').stepUp()">+</button>
       ```
   
    -  This reply was modified 2 years, 8 months ago by [rakosolapov](https://wordpress.org/support/users/rakosolapov/).
    -  This reply was modified 2 years, 8 months ago by [rakosolapov](https://wordpress.org/support/users/rakosolapov/).
 *  Thread Starter [exlipse](https://wordpress.org/support/users/exlipse/)
 * (@exlipse)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/validate-only-when-submit/#post-17079822)
 * Normally there is a habit of filling the form starting from the first element.
   this is normal. But sometimes users select the selectbox or radio or checkbox
   option first. When this operation is performed, it is disturbing for the user
   experience that a warning appears for items marked as “required” in previous 
   inputs. We have already indicated that it is required with a “*” sign. and we
   may not want to show annoying warnings to the user while they are still filling
   out the form before they have even pressed the submit button.
 *  Plugin Author [Takayuki Miyoshi](https://wordpress.org/support/users/takayukister/)
 * (@takayukister)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/validate-only-when-submit/#post-17081636)
 * > But sometimes users select the selectbox or radio or checkbox option first.
 * What do you think provokes this user behavior?
 *  [Tactic Marketing](https://wordpress.org/support/users/tacticmarketing/)
 * (@tacticmarketing)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/validate-only-when-submit/#post-17257915)
 * For me adding `class:novalidate` to all required fields sorted the issue.
 * It no longer validates on changing fields only on submit
 *  [cbisteam](https://wordpress.org/support/users/cbisteam/)
 * (@cbisteam)
 * [2 years ago](https://wordpress.org/support/topic/validate-only-when-submit/#post-17775032)
 * I fixed it with change css:
 * `form[data-status="init"] .wpcf7-not-valid-tip{
   display: none;}
 * Then, it won’t validate until the user clicks submit
 *  [xsonic](https://wordpress.org/support/users/xsonic/)
 * (@xsonic)
 * [1 year, 11 months ago](https://wordpress.org/support/topic/validate-only-when-submit/#post-17838776)
 * [@takayukister](https://wordpress.org/support/users/takayukister/) , showing 
   validation errors immediately versus showing them on submit is a highly debated
   topic in UX research and depends heavily on the use case.
   It also creates unwanted
   effects with autofilling forms. Consider a form like this:
 * —————————–
 * [name]
   [email]
 * [profession]
   [years-of-experience][…some other job related fields.. maybe it’s
   an application form…]
 * [city]
 * —————————–
 * The user clicks in [name] and it autofills name, email and city, but then all
   fields in between will become red, which is no good UX. If it’s live validation,
   an error should only appear in fields the user actually touched.
 * Please consider adding an option to disable this behaviour.
 *  [cs181](https://wordpress.org/support/users/cs181/)
 * (@cs181)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/validate-only-when-submit/#post-18021162)
 * Try this JS code.
 *     ```wp-block-code
       $('.wpcf7').addClass('novalidate').on('wpcf7invalid', function (e) {	this.classList.remove('novalidate');});
       ```
   

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Validate only when submit’ is closed to new replies.

 * ![](https://ps.w.org/contact-form-7/assets/icon.svg?rev=2339255)
 * [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/contact-form-7/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/contact-form-7/)
 * [Active Topics](https://wordpress.org/support/plugin/contact-form-7/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/contact-form-7/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/contact-form-7/reviews/)

 * 8 replies
 * 7 participants
 * Last reply from: [cs181](https://wordpress.org/support/users/cs181/)
 * Last activity: [1 year, 8 months ago](https://wordpress.org/support/topic/validate-only-when-submit/#post-18021162)
 * Status: resolved