Class: EVSS::PCIU::EmailAddress
- Defined in:
- lib/evss/pciu/email_address.rb
Overview
Model for PCIU email addresses
Constant Summary collapse
- VALID_EMAIL_REGEX =
/.+@.+\..+/i
Instance Attribute Summary collapse
-
#email ⇒ String
Email address between 6-255 characters containing an @-sign and a period to indicate a TLD.
Instance Attribute Details
#email ⇒ String
Returns Email address between 6-255 characters containing an @-sign and a period to indicate a TLD.
13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/evss/pciu/email_address.rb', line 13 class EmailAddress < BaseModel VALID_EMAIL_REGEX = /.+@.+\..+/i attribute :email, String validates( :email, presence: true, format: { with: VALID_EMAIL_REGEX }, length: { maximum: 255, minimum: 6 } ) end |