I am trying to create a validation that checks to make sure a domain/url is valid for example \"test.com\"
def valid_domain_name?
domain_name = domain.spli
^(http|https):\/\/|[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,6}(:[0-9]{1,5})?(\/.*)?$/ix
http://rubular.com/r/cdkLxAkTbk
Added optional http:// or https://
The longest TLD is .museum
, which has 6 characters...