question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

onSubmit submits form if handler function has error

See original GitHub issue

I have <form #signInForm="ngForm" (ngSubmit)="onSubmit($event)"> whish is just basic sign in form, when error occurs in onSubmit method it just submits the form. There’s no possibility of preventing default action at first as $event is just null

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

14reactions
DzmitryShylovichcommented, Oct 3, 2016
0reactions
angular-automatic-lock-bot[bot]commented, Sep 9, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I disable form onsubmit if there is an error?
I'm using try/catch for error handling so when there is an error I do not want the window to close. <form onSubmit =...
Read more >
.submit() | jQuery API Documentation
The submit event is sent to an element when the user is attempting to submit a form. It can only be attached to...
Read more >
How to type a React form onSubmit handler
It's a bit verbose and distracts from the main purpose of the function; If I need to use that form anywhere else, I'll...
Read more >
JavaScript Form Validation - The Art of Web
The purpose of a form validation script is to return a boolean value (true or false) to the onsubmit event handler. A value...
Read more >
Batch validation
If any one validation fails, the dispatching function returns false to the onsubmit event handler, forcing it to evaluate to return false and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found