Sha256: ddf6acdd876ecf47293d94d42fb7a610a42392542d4f869c2633bb0b84f67073
Contents?: true
Size: 284 Bytes
Versions: 2
Compression:
Stored size: 284 Bytes
Contents
module Brigadier module Validators class Email include Base def failure_message %('%s' is not a valid email address.) % [ value ] end def valid? value.match(/\A([\w+\-].?)+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
brigadier-0.1.2 | lib/brigadier/validators/email.rb |
brigadier-0.1.1 | lib/brigadier/validators/email.rb |