diff --git a/app/models/mx.rb b/app/models/mx.rb index 3246d388..957acc27 100644 --- a/app/models/mx.rb +++ b/app/models/mx.rb @@ -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