mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-25 08:09:38 +02:00
Preference to set default_period (#1941)
This commit is contained in:
parent
372b64ffea
commit
26762477a3
12 changed files with 35 additions and 8 deletions
|
@ -9,6 +9,7 @@ class User < ApplicationRecord
|
|||
|
||||
validates :email, presence: true, uniqueness: true, format: { with: URI::MailTo::EMAIL_REGEXP }
|
||||
validate :ensure_valid_profile_image
|
||||
validates :default_period, inclusion: { in: Period::PERIODS.keys }
|
||||
normalizes :email, with: ->(email) { email.strip.downcase }
|
||||
normalizes :unconfirmed_email, with: ->(email) { email&.strip&.downcase }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue