validation_kit 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,7 +14,7 @@ module ValidationKit
14
14
  :default => [:"activerecord.errors.models.#{model_name.underscore}.invalid",
15
15
  options[:message],
16
16
  :'activerecord.errors.messages.invalid'])
17
- record.errors[attribute] << message
17
+ record.errors[attribute].add message
18
18
  end
19
19
  end
20
20
  end
@@ -35,7 +35,7 @@ module ValidationKit
35
35
  :'activerecord.errors.messages.all_lowercase'])
36
36
  end
37
37
 
38
- record.errors[attribute] << message
38
+ record.errors[attribute].add message
39
39
 
40
40
  end
41
41
  end
@@ -37,12 +37,12 @@ module ValidationKit
37
37
  options[:message], :'activerecord.errors.messages.invalid'])
38
38
 
39
39
  unless (options[:allow_blank] && new_value.blank?) || new_value =~ current_regex
40
- record.errors[attribute] << message
40
+ record.errors[attribute].add message
41
41
  else
42
42
  if options[:set]
43
43
  formatted_phone = format_as_phone(value, country, options[:area_key])
44
44
  if formatted_phone.nil?
45
- record.errors[attribute] << message
45
+ record.errors[attribute].add message
46
46
  else
47
47
  record.send(attribute.to_s + '=', formatted_phone)
48
48
  end
@@ -51,7 +51,7 @@ module ValidationKit
51
51
  :default => [:"activerecord.errors.models.#{model_name.underscore}.invalid",
52
52
  options[:message],
53
53
  :'activerecord.errors.messages.invalid'])
54
- record.errors[attribute] << message
54
+ record.errors[attribute].add message
55
55
  else
56
56
  record.send(attribute.to_s + '=',
57
57
  format_as_postal_code(new_value, country, disallowed_characters)
@@ -1,3 +1,3 @@
1
1
  module ValidationKit
2
- VERSION = "1.0.2"
2
+ VERSION = "1.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: validation_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: