Angularjs angular 1.2中的表单验证

Angularjs angular 1.2中的表单验证,angularjs,haml,Angularjs,Haml,我正在尝试将自定义表单验证添加到angular应用程序中,该应用程序在angular 1.2中制作。我真的是个新手,我有点困惑。在前端,此应用程序使用haml,通行证字段如下所示: .col-lg-12.form-group{ 'data-ng-class'=>"{ 'has-error' : registration_form.password.$invalid && registration_form.password.$dirty }"}

我正在尝试将自定义表单验证添加到angular应用程序中,该应用程序在angular 1.2中制作。我真的是个新手,我有点困惑。在前端,此应用程序使用haml,通行证字段如下所示:

        .col-lg-12.form-group{ 'data-ng-class'=>"{ 'has-error' : registration_form.password.$invalid && registration_form.password.$dirty }"}
      %input.form-control.square-borders.background-gray-fa{ :name=>"password", :placeholder=>"Password", :type=>"password", 'data-ng-model'=>"user.password", 'data-ng-focus'=> true, :required=> true,:uppercase=> true,  'data-ng-minlength'=>"6", 'data-ng-maxlength'=>"128" }
      %label{'data-ng-show'=>"registration_form.password.$invalid &&(!registration_form.password.$pristine ) && registration_form.password.$error.required && !registration_form.password.$focused", :class=>"help-block help-error-message-infield error-msg-right-correction square-borders"}
        Required
      %label{ 'data-ng-show'=>"registration_form.password.$invalid &&(!registration_form.password.$pristine ) && registration_form.password.$error.minlength && !registration_form.password.$focused", :class=>"help-block help-error-message-infield error-msg-right-correction square-borders"}
        Too Short
它只检查angular中已内置的min char,我想添加另一个限制,如下所示:

%label{ 'data-ng-show'=>"registration_form.password.$invalid &&(!registration_form.password.$pristine ) && registration_form.password.$error.uppercase && !registration_form.password.$focused", :class=>"help-block help-error-message-infield error-msg-right-correction square-borders"}
        needs at least one uppercase letter

最好的方法是什么?

最好的方法是迁移到最新的稳定版本(1.6.4),然后阅读文档:问题是它是一个大型应用程序的一部分,我无法控制,因此无法升级。然后阅读angular版本的相同文档。我已经检查了文档,找不到任何有用的东西。我只是给了你链接。只需更改版本,就可以获得文档,并提供完整的示例。最好的方法是迁移到最新的稳定版本(1.6.4),然后阅读文档:问题是它是我无法控制的大型应用程序的一部分,因此我无法升级。然后阅读angular版本的相同文档。我已经检查了文档,找不到任何有用的内容。我只是给了你链接。只需更改版本,就可以获得文档,并提供完整的示例。