Skip to content

angular validation focus,blur triggers #16412

Closed

Description

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[x ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Inputs are validated instant with a focus/blur event, even Google itself (GMail, all apps), they validate after the first submit. Then it's cool. NG1 i think i was able to override but NG4.1 is not giving any docs about it.

But the default behavior of Angular is that even if i do nothing, it validates, So i just focus or blur an input, it valdiates and shows an error, i think for users it is weird.

I tried everything, StackOverflow (http://stackoverflow.com/questions/43679197/how-can-all-forms-validate-only-when-i-click-submit?noredirect=1#comment74404332_43679197) but there is no override the validation behavior.

Expected behavior

Set the validation, like after submit. Right now, nothing in the about. Very complex do it a simple validation, which I try to a lot of forms.

Minimal reproduction of the problem with instructions

It is a default Angular validation.

What is the motivation / use case for changing the behavior?

To trigger validation after onsbumit, and keep the form if we didn't do anything just blur, focus.

Please tell us about your environment:

linux, win

  • Angular version: 2.0.X

4.1

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

any

  • Language: [all | TypeScript X.X | ES6/7 | ES5]
    ts

  • Node (for AoT issues): node --version =
    any

Activity

  1. kara commented on Aug 12, 2017

    @kara
    Contributor

    @ghost It sounds like you are looking for the "updateOn: submit" hook we just added in 5.0.0-beta.3. Check out the PR here for more info.

  2. added
    featureLabel used to distinguish feature request from other issues
    on Aug 12, 2017
  3. angular-automatic-lock-bot commented on Sep 12, 2019

    @angular-automatic-lock-bot

    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.

  4. locked and limited conversation to collaborators on Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: formsfeatureLabel used to distinguish feature request from other issues

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions