-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.js
43 lines (42 loc) · 840 Bytes
/
example.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
(function(){
"use strict";
angular.module("app", ["com.chresoft.validator"])
.controller("FormController", [function FormController(){
var vm = angular.extend(this, {
validate : function(isValid, rule, modelValue, fieldValue){
return isValid;
},
fields : [
{
label:"UserName",
name:"username",
type:"text",
rules : [
{name:"required", value:false},
{name:"minlength", value:5},
{name:"maxlength", value:20}
]
},
{
label:"Password",
name:"password",
type:"password",
rules : [
{name:"required"},
{name:"minlength", value:3},
{name:"numeric"}
]
},
{
label:"Email Address",
name:"email",
type:"email",
rules : [
{name : "required"},
{name : "email" }
]
}
]
});
}]);
})();