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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7e5ff99a7160a0d8f79f420e2c75cba086d3133767d976b8181774b69202111
4
- data.tar.gz: 22d5cf45133336c385ddd7224c92edb92b7e5257b21d9a984d4454302f0e8a54
3
+ metadata.gz: 021fe3db4dcf1cef22a159e3fdfb468c92b11b5fea358257c327b5eb3dd7154f
4
+ data.tar.gz: 7e4de73eae69b1470bd27970f94d94651bfe9403d8e15eac8cf4e8c1bb7b9c54
5
5
  SHA512:
6
- metadata.gz: 0f174979e626c3bf485987a3fdf1db864f877bc56eda510ea133602c3a173fbbd9d141f9f7caac445dfe88d3dccbbc291f98d12708386f1924e433d4abf7faf6
7
- data.tar.gz: a699f2c846a3074c2e2bc5e0ac5df85354189e1ed4552fe890485161c2235b8b5d05cebfff3796142c8e2c14808515ba41cd1aeccd11a06e970f6029448c7375
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
- });
@@ -3,7 +3,7 @@ require_dependency "nyros_form2/application_controller"
3
3
  module NyrosForm2
4
4
  class UsersController < ApplicationController
5
5
  def index
6
- @users = User.all.paginate(:per_page => 5, :page => params[:page]).order('created_at DESC')
6
+ @users = User.all
7
7
  end
8
8
 
9
9
  def new
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module NyrosForm2
2
- VERSION = '0.3.3'
2
+ VERSION = '0.3.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nyros_form2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - raju rekadi