add mail+pass change option
This commit is contained in:
@@ -10,10 +10,10 @@ class User < ActiveRecord::Base
|
||||
|
||||
before_validation :strip_whitespaces, :set_uuid, :set_name, :set_email_token, :set_role
|
||||
|
||||
validates_presence_of :password, :password_confirmation, :email_token, :on => :create
|
||||
validates_presence_of :password, :password_confirmation, :email_token, on: :create
|
||||
validates_presence_of :name, :email, :ign
|
||||
|
||||
validates_length_of :password, in: 8..256, :on => :create
|
||||
validates_length_of :password, in: 8..256, on: [:create, :update], allow_nil: true
|
||||
validates_length_of :name, in: 2..30
|
||||
validates_length_of :about, maximum: 5000
|
||||
validates_length_of :ign, minimum: 1, maximum: 16
|
||||
|
||||
Reference in New Issue
Block a user