Skip to content

Forms: Support asynchronous validation #1068

@kpko

Description

@kpko

I saw the demos of the new Forms API in Angular 2 on http://angularjs.blogspot.de/2015/03/forms-in-angular-2.html and wondered, if asynchronous validation will be supported. A common use-case for asynchronous validation would be a user registration form. The user name should be validated on the server.

We need a new state to indicate that the form/a particular field is currently validating. This enables us to show some kind of loading spinner on the form or a field. (pending validation)

Asynchronous validation was implemented in Angular 1.3, it would be great if we had this in Angular 2 Forms too. A great example of this functionality from Angular 1.3 (the $pending state for particular fields) is shown here: http://www.yearofmoo.com/2014/09/taming-forms-in-angularjs-1-3.html#asnychronous-validation-via-asyncvalidators

This topic was already discussed in the Angular 2 Forms design doc with a few suggestions regarding the implementation: https://docs.google.com/document/d/1US9h0ORqBltl71TlEU6s76ix8SUnOLE2jabHVg9xxEA/
Maybe we can discuss how this feature should be laid out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions