using Angular validation directives with Breeze blocks any input that is invalid

后端 未结 4 1456
醉梦人生
醉梦人生 2021-02-20 14:15

If you add any of the angular directives for validation (ng-minlength, ng-maxlength, ng-pattern, etc.) to an input that is bound to a breeze entity it blocks any user input if f

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-20 14:39

    Angular 1.3.0-rc.1 introduced the allowInvalid option for use with the ngModelOptions directive. It is essentially a formalization of the OP's hack at line 16331. The option instructs Angular to allow invalid form inputs to be written to $scope, and solves the problem neatly.

    Usage:

    
    

    See this feature request for more information: https://github.com/angular/angular.js/issues/8290.

提交回复
热议问题