# Extended to use only strict mode with following allowed characters:# ' - apostrophe## See http://www.remote.org/jochen/mail/info/chars.html#classEmailValidator<ActiveModel::EachValidator@@default_options={}defself.default_options@@default_optionsenddefvalidate_each(record,attribute,value)options=@@default_options.merge(self.options)unlessvalue=~/\A\s*([-a-z0-9+._']{1,64})@((?:[-a-z0-9]+\.)+[a-z]{2,})\s*\z/irecord.errors.add(attribute,options[:message]||:invalid)endendend