drexed-validators 0.0.3 → 0.0.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
  SHA1:
3
- metadata.gz: 0ec780f0c58485c87e8e3ec35dc969e41cb648d4
4
- data.tar.gz: d212192afe1f5d54cffc9c1d68fdf38e284ee74a
3
+ metadata.gz: 14f603b88e19295a517650b8612c15e4df422f20
4
+ data.tar.gz: 92ac1368d38d44af7a25e65271ecb13f5e8dc763
5
5
  SHA512:
6
- metadata.gz: f01b6c59c12daf96798f9256316cb5f4bec6188dc311c70bd1ac172a3c3a5124b040d24446f3b2eb27e17c36dff74c8896fc13e18f396eb8057ee42a5ef04b9d
7
- data.tar.gz: 74cb8e722e6e4eb499de46831ba82d0cad11e0a6c122f694e44089773e5484c21a26a6d8bdd1045d2ae064e63fdd1244fbbb911910f98b5a8107ec5125781830
6
+ metadata.gz: 42621fc33bba8f42887cee47b7ea82a1f7f3f20796e2a63834d7293322130d7b872d4c026909fc34ca5b8c8d0130f5cbe94c41363f8216abc112466dc21e233c
7
+ data.tar.gz: daffa9659f261cd5308f74e78accf065035b189b17ee33f6fa410d6da2cd05ec9b10eb25e87d2f60d615635ce028bf93f0c0f442e1cf18ef96bdb7242cd6489e
@@ -1,3 +1,5 @@
1
+ require 'active_model'
2
+
1
3
  class EmailValidator < ActiveModel::EachValidator
2
4
  def validate_each(object, attribute, value)
3
5
  unless value =~ /\A[A-Z0-9._%a-z\-]+@(?:[A-Z0-9a-z\-]+\.)+[A-Za-z]{2,4}\z/i
@@ -1,3 +1,5 @@
1
+ require 'active_model'
2
+
1
3
  class UrlValidator < ActiveModel::EachValidator
2
4
  def validate_each(object, attribute, value)
3
5
  unless value =~ /https?:\/\/[\S]+/i
@@ -1,5 +1,5 @@
1
1
  module Drexed
2
2
  module Validators
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drexed-validators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez