Fixed #is_valid_domain? regex to include appended dot.

This commit is contained in:
soh_cah_toa
2014-04-28 22:21:39 -04:00
parent e1c27f4feb
commit 8dac5c95eb

View File

@@ -149,7 +149,7 @@ module Filters
# TLD's is not static.
def self.is_valid_domain?(domain)
return false unless is_non_empty_string?(domain)
return true if domain =~ /^[0-9a-z-]+(\.[0-9a-z-]+)*(\.[a-z]{2,})$/i
return true if domain =~ /^[0-9a-z-]+(\.[0-9a-z-]+)*(\.[a-z]{2,}).?$/i
false
end