psantos10/Validation

View on GitHub
lib/resize/rules/is_email.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Resize
  module Validation
    module Rules
      module IsEmail
        private
          def is_valid?(input)
            !/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i.match(input.to_s).nil?
          end
      end
    end
  end
end