ig-validator-utils 0.0.6 → 0.0.7

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ig-validator-utils.rb +8 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23b14c40b525eac2de3cea77fab6da2a6f08ee90
4
- data.tar.gz: d68793f899d7ef2ac7d96d5ef7643a9fde439020
3
+ metadata.gz: 9a3903fda3c92fb706290cbac44b7cd212888775
4
+ data.tar.gz: 9b35463a9d4fe34097bcf3b0e1eeb51b70dd222e
5
5
  SHA512:
6
- metadata.gz: 0260326b29ab8c20b27835887f9a48fd4b8e4441d67997800f5bf1d0d8447d0516c2d3edc1e098e587b1b3922201756da9d05562d9f844332402bfb202bacf2b
7
- data.tar.gz: 4348eeb8e6edda5959fc4241066ec675747c3c16fda802785f74efd3fad6de63e1f79de310c45de067ec6d2840c61f734f038851b58a0745392cd3ab3a9fa00a
6
+ metadata.gz: e8696097e0874e4edee90fc7a20f4e9e54900da5241e5b785003d39f68846c12c9a8c0d028326821a7dc28513f09ec4e67205ac15b4bb839ff02c1d713f6dc45
7
+ data.tar.gz: 6707fa4d002e69200d34a2f50346c6c7f80ad57b449fea520425896ddab36a15ca1f2b3cbfdff8e2073a2d79b2daaf5255c82456bb8c413613a97ffc56981546
@@ -12,9 +12,16 @@ module ValidatorUtils
12
12
  end
13
13
 
14
14
  # \p{L} matches a single unicode letter
15
- # also allows points, apostrophe and hyphen
15
+ # also allows space, points, apostrophe and hyphen
16
16
  def self.validate_string_strict(value)
17
17
  value =~ /^[\p{L} .'-]+$/i
18
+ end
19
+
20
+ # \p{L} matches a single unicode letter
21
+ # \p{N} matches a single unicode number
22
+ # allow points, comma, apostrophe, hyphen, spaces
23
+ def self.validate_address(value)
24
+ value =~ /^[\p{L}\p{N} .,'-]+$/i
18
25
  end
19
26
 
20
27
  def self.validate_integer(value)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ig-validator-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Infinity-G