How to validates cyrilic email in Rails 3.1?
- by iKeler
Let's say I had the email address like putin-crab@?????????.??
How to validate that address in rails 3.1?
My Model(i use Mongoid):
#encoding: utf-8
class User
include Mongoid::Document
field :email, :type => String
validates :email, :presence => true, :format => { :with => RFC822::EMAIL }
end
For validations reqexp i…