-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
124 lines (117 loc) · 5.11 KB
/
index.html
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Jquery Form Validator Plugin</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="vendor/form-validator-vendor.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="vendor/form-validator-vendor.min.js"></script>
<script src="form-validator.js"></script>
</head>
<body>
<h1>Jquery Form Validator Plugin</h1>
<h2>Form 1</h2>
<form action="" method="POST">
<label for="">Email</label>
<input type="text" name="email" is="email" placeholder="Email" msg="O email está no formato errado ou o campo está em branco."><br>
<label for="">Second Email</label>
<input type="text" name="email" is="secondEmail" placeholder="Second Email"><br>
<label for="">CPF</label>
<input type="text" name="cpf" is="cpf" placeholder="CPF"><br>
<label for="">CNPJ</label>
<input type="text" name="cnpj" is="cnpj" placeholder="CNPJ"><br>
<label for="">CPF/CNPJ</label>
<input type="text" name="cpf_cnpj" is="cpf_cnpj" placeholder="CPF/CNPJ"><br>
<label for="">Requerido</label>
<input type="text" name="required" is="required" placeholder="Requerido"><br>
<label for="">Data</label>
<input type="text" name="date" is="date" placeholder="Data"><br>
<label for="">Telefone</label>
<input type="text" name="phone" is="phone" placeholder="Telefone"><br>
<label for="">Telefone Opcional</label>
<input type="text" name="phone" is="phone" optional="true" placeholder="Telefone"><br>
<label for="">CEP</label>
<input type="text" name="cep" is="cep" placeholder="CEP"><br>
<label for="">Estado</label>
<input type="text" class="estado" name="estado" placeholder="Estado"><br>
<label for="">Cidade</label>
<input type="text" class="cidade" name="cidade" placeholder="Cidade"><br>
<label for="">Bairro</label>
<input type="text" class="bairro" name="bairro" placeholder="Bairro"><br>
<label for="">Endereço</label>
<input type="text" class="endereco" name="endereco" placeholder="Endereço"><br>
<label for="">Dinheiro</label>
<input type="text" name="dinheiro" is="money" placeholder="Dinheiro"><br>
<label for="">Primeira Senha</label>
<input type="password" name="fistPass" is="firstPass" placeholder="Primeira Senha"><br>
<label for="">Segunda Senha</label>
<input type="password" name="secondPass" is="secondPass" placeholder="Segunda Senha"><br>
<label for="">Sem Is</label>
<input type="text" name="semIs" placeholder="Sem is"><br>
<label for="">TIme</label>
<input type="text" name="time" placeholder="Time" is="time"><br>
<label for="">CNPJ</label>
<input type="text" name="cnpj" placeholder="CNPJ" is="cnpj"><br>
<label for="">CPF E CNPJ</label>
<input type="text" name="cpf_cpnj" placeholder="CPF E CNPJ" is="cpf_cnpj"><br>
<label for="">TEXT AREA</label>
<textarea is="required" msg="Deve escrever sobre ..."></textarea><br>
<input type="submit" value="Enviar 1">
</form>
<h2>Form 2</h2>
<form action="" id="form2">
<label for="">Email</label>
<input type="text" name="email" is="v1" placeholder="Email"><br>
<label for="">CPF</label>
<input type="text" name="cpf" is="v2" placeholder="CPF"><br>
<label for="">CNPJ</label>
<input type="text" name="cnpj" is="cnpj" placeholder="CNPJ"><br>
<label for="">CPF/CNPJ</label>
<input type="text" name="cpf_cnpj" is="cpf_cnpj" placeholder="CPF/CNPJ"><br>
<label for="">Requerido</label>
<input type="text" name="required" is="required" placeholder="Requerido"><br>
<label for="">Data</label>
<input type="text" name="date" is="date" placeholder="Data"><br>
<label for="">Telefone</label>
<input type="text" name="phone" is="phone" placeholder="Telefone"><br>
<label for="">CEP</label>
<input type="text" name="cep" is="cep" placeholder="CEP"><br>
<label for="">Estado</label>
<input type="text" class="estado" name="estado" placeholder="Estado"><br>
<label for="">Cidade</label>
<input type="text" class="cidade" name="cidade" placeholder="Cidade"><br>
<label for="">Bairro</label>
<input type="text" class="bairro" name="bairro" placeholder="Bairro"><br>
<label for="">Endereço</label>
<input type="text" class="endereco" name="endereco" placeholder="Endereço"><br>
<label for="">Dinheiro</label>
<input type="text" name="dinheiro" is="money" placeholder="Dinheiro"><br>
<label for="">Primeira Senha</label>
<input type="password" name="fistPass" is="firstPass" placeholder="Primeira Senha"><br>
<label for="">Segunda Senha</label>
<input type="password" name="secondPass" is="secondPass" placeholder="Segunda Senha"><br>
</form>
<button type="submit" form="form2" value="Enviar 2">Enviar 2</button>
<script type="text/javascript">
$(document).ready(function() {
$('form').formValidator({
beforeValidate: function() {
console.log("Before Validate");
},
afterValidate: function() {
},
customValidator: {
v1: function() {
console.log("Novo Validador");
return true;
},
v2: function() {
console.log("Novo validador 2");
}
}
});
});
</script>
</body>
</html>