Angular 2(Beta)服务器端验证消息

我正在寻找一种优雅的方法来显示来自服务器端API的验证消息,而不必创建自定义验证程序或对UI中所有可能的消息进行硬编码.

I am looking for an elegant way to display validation messages from a server side API without having to create custom validators or hard coding all possible messages in the UI.

我需要将错误消息添加到特定字段以及整个表单.

I need to add error messages to specific fields as well as to the entire form.

这必须在Angular 2.0.0-beta.3中工作

This must work in Angular 2.0.0-beta.3



 1 条回答