angular icon indicating copy to clipboard operation
angular copied to clipboard

Forms: Support asynchronous validation

Open kpko opened this issue 11 years ago • 21 comments

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.

kpko avatar Mar 24 '15 00:03 kpko

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.