Angular JS自动验证

时间:2019-07-02 09:39:08

标签: angularjs

我已经阅读了有关angularjs自动验证的论坛。提到了“ jcs-autovalidate”模块。

我尝试使用"jcs-auto validate module"来实现自动验证。我什至包括自动验证库。

<html>
    <head>
        <script src ="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
        <script src="/lib/jcs-auto-validate.min.js"></script>
    </head>
    <body>
        <h2>Angular JS Validation</h2>
        <div ng-app="myApp" ng-controller="myCtrl">
        Name : <input type ="text" ng-model = "username" placeholder ="Enter Name"><br>
        <br>
        Email  : <input type ="email" ng-model ="useremail" placeholder ="Enter Email"><br>
        <br>
        Password : <input type ="password" ng-model ="userpwd" placeholder ="Enter Password"><br>
        <br>
        <button>Submit</button>
            <script>
                var app = angular.module("myApp", ["jcs-autovalidate"]);
            </script>
        </div>
    </body>
</html>

请帮助我进行验证。

0 个答案:

没有答案