Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

Commit

Permalink
Don't allow spaces in the MX record content [#67]
Browse files Browse the repository at this point in the history
  • Loading branch information
ripta committed Apr 16, 2009
1 parent 47268fa commit 3151b4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/mx.rb
Expand Up @@ -14,6 +14,9 @@ class MX < Record
:only_integer => true

validates_presence_of :content
validates_format_of :content,
:allow_blank => true,
:with => /\A\S+\Z/

# Only accept valid IPv4 addresses
def validate_with_mx
Expand Down

0 comments on commit 3151b4b

Please sign in to comment.