nyros_form2 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/nyros_form2/application.js +0 -31
- data/app/controllers/nyros_form2/users_controller.rb +1 -1
- data/app/views/nyros_form2/users/edit.html.erb +37 -1
- data/app/views/nyros_form2/users/new.html.erb +35 -0
- data/lib/nyros_form2/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 021fe3db4dcf1cef22a159e3fdfb468c92b11b5fea358257c327b5eb3dd7154f
|
4
|
+
data.tar.gz: 7e4de73eae69b1470bd27970f94d94651bfe9403d8e15eac8cf4e8c1bb7b9c54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac48bad50a21f56ec9956673b1f730192fbe2dfcbdf2270b617a71d15e8f506cd928bee5e57c1bf1417c7740c273d3b5d30628b4761e43bd311c0fab8e3dd45a
|
7
|
+
data.tar.gz: 583d61d24d8e71072f4f39d1bafddd4ddb1f19741d35cc022d656b2f5e0c1eaff5ab16961c85fa257108b8ba5731cba77b354bdb6d40fc665d851460a3fd7a91
|
@@ -16,34 +16,3 @@
|
|
16
16
|
//= require_tree .
|
17
17
|
|
18
18
|
|
19
|
-
// On change form validations
|
20
|
-
$(function() {
|
21
|
-
$("form[name='myForm']").validate({
|
22
|
-
rules: {
|
23
|
-
name: "required",
|
24
|
-
email: {
|
25
|
-
required: true,
|
26
|
-
email: true
|
27
|
-
},
|
28
|
-
mobile: {
|
29
|
-
required: true,
|
30
|
-
digits: true,
|
31
|
-
minlength: 10,
|
32
|
-
maxlength: 10,
|
33
|
-
}
|
34
|
-
},
|
35
|
-
// Specify validation error messages
|
36
|
-
messages: {
|
37
|
-
name: "Please enter your firstname",
|
38
|
-
mobile: {
|
39
|
-
required: "Please Enter mobile number",
|
40
|
-
minlength: "Your Mobile must be at least 10 numbers long"
|
41
|
-
},
|
42
|
-
email: "Please enter a valid email address"
|
43
|
-
},
|
44
|
-
// in the "action" attribute of the form when valid
|
45
|
-
submitHandler: function(form) {
|
46
|
-
form.submit();
|
47
|
-
}
|
48
|
-
});
|
49
|
-
});
|
@@ -37,4 +37,40 @@
|
|
37
37
|
<%= link_to "Back", users_path %>
|
38
38
|
</div>
|
39
39
|
</div>
|
40
|
-
</div>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
|
43
|
+
|
44
|
+
<script type="text/javascript">
|
45
|
+
// On change form validations
|
46
|
+
$(function() {
|
47
|
+
$("form[name='myForm']").validate({
|
48
|
+
rules: {
|
49
|
+
name: "required",
|
50
|
+
email: {
|
51
|
+
required: true,
|
52
|
+
email: true
|
53
|
+
},
|
54
|
+
mobile: {
|
55
|
+
required: true,
|
56
|
+
digits: true,
|
57
|
+
minlength: 10,
|
58
|
+
maxlength: 10,
|
59
|
+
}
|
60
|
+
},
|
61
|
+
// Specify validation error messages
|
62
|
+
messages: {
|
63
|
+
name: "Please enter your firstname",
|
64
|
+
mobile: {
|
65
|
+
required: "Please Enter mobile number",
|
66
|
+
minlength: "Your Mobile must be at least 10 numbers long"
|
67
|
+
},
|
68
|
+
email: "Please enter a valid email address"
|
69
|
+
},
|
70
|
+
// in the "action" attribute of the form when valid
|
71
|
+
submitHandler: function(form) {
|
72
|
+
form.submit();
|
73
|
+
}
|
74
|
+
});
|
75
|
+
});
|
76
|
+
</script>
|
@@ -41,6 +41,41 @@
|
|
41
41
|
</div>
|
42
42
|
|
43
43
|
|
44
|
+
<script type="text/javascript">
|
45
|
+
// On change form validations
|
46
|
+
$(function() {
|
47
|
+
$("form[name='myForm']").validate({
|
48
|
+
rules: {
|
49
|
+
name: "required",
|
50
|
+
email: {
|
51
|
+
required: true,
|
52
|
+
email: true
|
53
|
+
},
|
54
|
+
mobile: {
|
55
|
+
required: true,
|
56
|
+
digits: true,
|
57
|
+
minlength: 10,
|
58
|
+
maxlength: 10,
|
59
|
+
}
|
60
|
+
},
|
61
|
+
// Specify validation error messages
|
62
|
+
messages: {
|
63
|
+
name: "Please enter your firstname",
|
64
|
+
mobile: {
|
65
|
+
required: "Please Enter mobile number",
|
66
|
+
minlength: "Your Mobile must be at least 10 numbers long"
|
67
|
+
},
|
68
|
+
email: "Please enter a valid email address"
|
69
|
+
},
|
70
|
+
// in the "action" attribute of the form when valid
|
71
|
+
submitHandler: function(form) {
|
72
|
+
form.submit();
|
73
|
+
}
|
74
|
+
});
|
75
|
+
});
|
76
|
+
</script>
|
77
|
+
|
78
|
+
|
44
79
|
|
45
80
|
|
46
81
|
|
data/lib/nyros_form2/version.rb
CHANGED