Sha256: f40ce54de2167f7ea8df87cdf18005eeb14dcc0e87387113da39785ad087f054
Contents?: true
Size: 797 Bytes
Versions: 4
Compression:
Stored size: 797 Bytes
Contents
# Taken from Mephisto (http://mephistoblog.com/) module SimplyUseful module Format DOMAIN = /^([a-z0-9]([-a-z0-9]*[a-z0-9])?\.)+((a[cdefgilmnoqrstuwxz]|aero|arpa)|(b[abdefghijmnorstvwyz]|biz)|(c[acdfghiklmnorsuvxyz]|cat|com|coop)|d[ejkmoz]|(e[ceghrstu]|edu)|f[ijkmor]|(g[abdefghilmnpqrstuwy]|gov)|(h[kmnrtu]#{(defined? RAILS_ENV) && RAILS_ENV=='test' ? '|host' : ''})|(i[delmnoqrst]|info|int)|(j[emop]|jobs)|k[eghimnprwyz]|l[abcikrstuvy]|(m[acdghklmnopqrstuvwxyz]|mil|mobi|museum)|(n[acefgilopruz]|name|net)|(om|org)|(p[aefghklmnrstwy]|pro)|qa|r[eouw]|s[abcdeghijklmnortvyz]|(t[cdfghjklmnoprtvwz]|travel)|u[agkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw])$/ unless const_defined?(:DOMAIN) STRING = /^[a-z0-9-]+$/ EMAIL = /(\A(\s*)\Z)|(\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z)/i end end
Version data entries
4 entries across 4 versions & 1 rubygems