has_validated_attributes 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/has_validated_attributes/version.rb +2 -2
- data/lib/has_validated_attributes.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d57439a5bdcac3e0a4f4a8c7d487f12ee610e8e2
|
4
|
+
data.tar.gz: 935797ad6188c4c2248bf6085d54f917e09e327d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 393bc34ff895f6c1a53b35dbebc23d382344e01588be065b137c521968b7b50742da0a78e97fb2f3cf5a5aa2b11bd1900d71e228e62a283b764e04d661f8d2ce
|
7
|
+
data.tar.gz: 356624b416db37b025b1892e5d070a8af82e40662ef244a7e5427141975c209094e9effc05a9f2044931a1ce22515dbf1bb9d3deb780138c93853711dba7bd61
|
@@ -1,3 +1,3 @@
|
|
1
1
|
module HasValidatedAttributes
|
2
|
-
VERSION = "1.0.
|
3
|
-
end
|
2
|
+
VERSION = "1.0.1"
|
3
|
+
end
|
@@ -39,7 +39,7 @@ module HasValidatedAttributes
|
|
39
39
|
:email => {:length => {:maximum => 63}, :format => {:with => /\A(?!\.)("([^"\r\\]|\\["\r\\])*"|([-a-z0-9!#$%&'’*+\/=?^_`{|}~]|(?<!\.)\.)*)(?<!\.)@[a-z0-9][\w\.-]*[a-z0-9]*\.[a-z][a-z\.]*[a-z]\z/i, :message => "should look like an email address."}, :has_if? => true},
|
40
40
|
:phone_number => {:numericality => {:greater_than_or_equal_to => 1000000000, :less_than => 10000000000, :message => 'accepts only 10 numbers and (),.- characters and must not be all 0s'}, :has_if? => true},
|
41
41
|
:phone_extension => {:length => {:maximum => 7}, :format => {:with => /\A\d+([\dxX]*\d)?\z/, :message => 'accepts only numbers (0-9) and "x"'}, :has_if? => true},
|
42
|
-
:domain => {:length => {:maximum => 63}, :format => {:with =>
|
42
|
+
:domain => {:length => {:maximum => 63}, :format => {:with => /[a-z0-9-]+\.[a-z0-9-\/\.]+/, :message => "should look like a domain name."}, :has_if? => true},
|
43
43
|
:zipcode => {:format => {:with => /\A\d{5}(\d{4})?\z/, :message => "must contain 5 or 9 numbers"}, :has_if? => true},
|
44
44
|
:middle_initial => {:format => {:with => /\A[a-zA-Z]{0,1}\z/u, :message => "accepts only one letter"}},
|
45
45
|
:dollar => {:format => {:with => /\A-?[0-9]{0,12}(\.[0-9]{0,2})?\z/, :message => "accepts only numeric characters, period, and negative sign"}, :numericality => {:greater_than => -1000000000000, :less_than => 1000000000000}, :allow_nil => true},
|