Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

add validateOn to ng-model-options to make the $parsers run even when updates are pending #7016

Open

Description

@shahata

On many cases it makes sense to have something like {updateOn: 'blur', validateOn: 'default'}. If this sounds reasonable to you I can have this PR ready this week. @petebacondarwin @lrlopez @IgorMinar - what do you think about this?

Activity

  1. self-assigned this
    on Apr 7, 2014
  2. added this to the milestone on Apr 7, 2014
  3. removed their assignment
    on Apr 7, 2014
  4. petebacondarwin commented on May 19, 2014

    @petebacondarwin
    Contributor

    Waiting for new validator pipeline to be merged before tackling this one.

  5. shahata commented on Jun 15, 2014

    @shahata
    ContributorAuthor

    @petebacondarwin I've rebased this with the new validator pipeline change, but I think it needs to wait until #7836 is resolved

  6. modified the milestones: Ice Box, on Jul 3, 2014
  7. pocesar commented on Aug 22, 2014

    @pocesar
    Contributor

    +1

  8. IgorMinar commented on Oct 2, 2014

    @IgorMinar
    Contributor

    I'm not a fan of this because it only adds more options and states without clear benefits.

  9. IgorMinar commented on Oct 2, 2014

    @IgorMinar
    Contributor

    Can you provide some strong use-cases that are not possible to implement in Angular 1.3 today?

  10. shahata commented on Oct 2, 2014

    @shahata
    ContributorAuthor

    @IgorMinar I've discussed this with @petebacondarwin a couple of months ago and we both agreed that we don't see a very strong use case for this. I don't mind closing this and wait to see if someone asks for something similar in the future.

  11. levic commented on Jan 18, 2016

    @levic

    A use case that would be handled easily with validateOn

    http://plnkr.co/6vRyCd94k36B6EDXPcmr

    By using ngModelOptions="{updateOn: 'submit'}" it allows you to not have to shadow the ng-model data you are modifying.

    Unfortunately it also means that it is not possible to easily provide validation feedback to the user. Adding validateOn would make this much simpler.

  12. BoLaMN commented on Feb 5, 2016

    @BoLaMN

    i had the same use case as @levic so i made two decorators to enable this functionality

    https://github.com/BoLaMN/angular-validate-on

  13. sryzycki commented on Jun 6, 2017

    @sryzycki

    +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions