{"record":{"id":"008026f0c0e98fa9","repo":"danbooru/danbooru","slug":"string-is-not-a-valid-email-address","errorCode":null,"errorMessage":"#{string} is not a valid email address","messagePattern":"#(.+?) is not a valid email address","errorType":"validation","errorClass":"Danbooru::EmailAddress::Error","httpStatus":null,"severity":"error","filePath":"app/logical/danbooru/email_address.rb","lineNumber":244,"sourceCode":"      fastmail.com\n      relay.firefox.com\n    ]\n\n    # @return [String] The original email address as a string.\n    attr_reader :address\n\n    # @return [Mail::Address] The parsed email address.\n    attr_reader :parsed_address\n\n    delegate :local, :domain, to: :parsed_address\n    alias_method :name, :local\n    alias_method :to_s, :address\n\n    # Parse a string into an email address, or raise an exception if the string is not a syntactically valid address.\n    #\n    # @param string [String, Danbooru::EmailAddress]\n    def initialize(string)\n      raise Error, \"#{string} is not a valid email address\" if !self.class.is_valid?(string)\n\n      @address = string.to_s\n      @parsed_address = Mail::Address.new(address)\n    end\n\n    # Parse a string into an email address, or return nil if the string is not a syntactically valid email address.\n    #\n    # @param url [String, Danbooru::EmailAddress]\n    # @return [Danbooru::EmailAddress]\n    def self.parse(address)\n      new(address)\n    rescue Error\n      nil\n    end\n\n    # Parse a string into an email address while attempting to fix common typos and mistakes, or return\n    # nil if the string can't be corrected into a valid email address.\n    #","sourceCodeStart":226,"sourceCodeEnd":262,"githubUrl":"https://github.com/danbooru/danbooru/blob/91fec095644078f87729db85d8f7486de5daf83d/app/logical/danbooru/email_address.rb#L226-L262","documentation":"Error \"#{string} is not a valid email address\" thrown in danbooru/danbooru.","triggerScenarios":"Thrown at app/logical/danbooru/email_address.rb:244 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enter a syntactically valid email address of the form user@example.com.","Check for typos, spaces, or a missing top-level domain in the address."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"91fec095644078f87729db85d8f7486de5daf83d","analyzedAt":"2026-08-24T06:18:22.875Z","schemaVersion":2},"datasetVersion":"2026-08-24T07:17:09.176Z"}