Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6223087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T08:25:39+00:00 2026-05-24T08:25:39+00:00

Is there any event raised before the validation of fields in an HTML5 form

  • 0

Is there any event raised before the validation of fields in an HTML5 form and before the submit of this form?

AFAIK, the submit event is raised just before the submit of the form, but after the validation step, so this one fires too late for me.

Update: I have a textarea with the “required” property, and if the user has JS I want to substitute it by an HTML editor. The HTML editor syncs its contents with the textarea on submit (after the validation step), so for the browser the textarea is always empty. That’s why I’m asking for an event fired before the validation. Any other way answer that solves this problem will be accepted.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T08:25:39+00:00Added an answer on May 24, 2026 at 8:25 am

    No, there is no event which fires before validation happens. There is only the invalid event, which is fired after validation of an invalid field, but before the validation UI is shown (preventing the default prevents showing the browser validation UI).

    In case you want to sync two fields, you have to use two events. The first is DOMContentReady and the second is the change event.

    Additional info: if you hide the invalid field element, the browser can not show the validation message to the user. You can workaround this with the following code (note this assumes that you are using jQuery 1.6x and a special structure):

    $('textarea.wysiwyg').bind('invalid', function(e){
        //remove validation bubble
        e.preventDefault();
        //implement your own validation UI
        $(this).next('div.wysiwyg').after('<p class="error">'+ $.prop(this, 'validationMessage') +'</p>');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to make the program sleep until an event occurs, but
Is there any event that can be raised when a shape in a Canvas(which
Is there any way to tell how the ComboBox_SelectionChanged event was raised in WPF.
Is there any event like OnValidate in LINQ where I can add my business
Is there any event associated with Install Components Screen? Something like Next button disabled
Hy, is there any event-drive/event-based Webframework for Python? I mean something like NitroGen is
I was wondering if there are any event handlers if the user clicked the
is there any javascript library that provides me with a custom event as soon
Is there any difference between document.onclick and window.onclick event?
Is there any standard/documented ways to implement two-finger tap event in WP7? If not,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.