nyros_form2 0.3.2 → 0.3.3
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 +31 -3
- 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: c7e5ff99a7160a0d8f79f420e2c75cba086d3133767d976b8181774b69202111
|
4
|
+
data.tar.gz: 22d5cf45133336c385ddd7224c92edb92b7e5257b21d9a984d4454302f0e8a54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f174979e626c3bf485987a3fdf1db864f877bc56eda510ea133602c3a173fbbd9d141f9f7caac445dfe88d3dccbbc291f98d12708386f1924e433d4abf7faf6
|
7
|
+
data.tar.gz: a699f2c846a3074c2e2bc5e0ac5df85354189e1ed4552fe890485161c2235b8b5d05cebfff3796142c8e2c14808515ba41cd1aeccd11a06e970f6029448c7375
|
@@ -13,9 +13,37 @@
|
|
13
13
|
|
14
14
|
//= require rails-ujs
|
15
15
|
//= require activestorage
|
16
|
-
//= require jquery_ujs
|
17
|
-
//= require bootstrap
|
18
16
|
//= require_tree .
|
19
17
|
|
20
18
|
|
21
|
-
|
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
|
+
});
|
data/lib/nyros_form2/version.rb
CHANGED