Skip to content
Advertisement

Tag: forms

Generalization of JQuery submit function

In my web application I have dozen of forms, of course each one with a different id. Then in my JavaScript file I wrote a custom handler for the submit event: I want to avoid to write the above code for each form. As first step I can just wrap it in another function, something like this: and then use:

How to show validation error in form in react js?

I have created a form and connected it to server. In case of validation error response is like this “message”: “ValidationError: confirmPassword: Confirm Password did not match” By regular expression I can pic up the error from this message e.g. “Confirm password did not match”. I don’t know how to show this error below respective input field ? Answer In

Advertisement