mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
WHOOPS -- fix user signup
This commit is contained in:
parent
d18ad1db12
commit
8d4bdcb2ef
@ -11,9 +11,12 @@ class User < ApplicationRecord
|
||||
include HasContent
|
||||
include Authority::UserAbilities
|
||||
|
||||
validates_uniqueness_of :username, allow_nil: true, allow_blank: true
|
||||
validates_format_of :username, with: /\A[A-Za-z0-9\-_\$\+\!\*]+\z/, message: 'must be between 1 and 40 alphanumeric characters (-, _, $, +, !, and * also accepted)'
|
||||
validates :username, length: { in: 0..40, message: 'must be between 1 and 40 alphanumeric characters (-, _, $, +, !, and * also accepted)' }
|
||||
validates :username,
|
||||
uniqueness: true,
|
||||
allow_nil: true,
|
||||
allow_blank: true,
|
||||
length: { maximum: 40 },
|
||||
format: /\A[A-Za-z0-9\-_\$\+\!\*]+\z/
|
||||
|
||||
has_many :subscriptions, dependent: :destroy
|
||||
has_many :billing_plans, through: :subscriptions
|
||||
|
||||
Loading…
Reference in New Issue
Block a user