I want to use 'username' field instead 'email'
I used gems
gem 'devise'
gem 'devise_token_auth'
My model 'User'
devise :database_authenticatable,
:trackable, :registerable, :authentication_keys => [:username]
include DeviseTokenAuth::Concerns::User
has_many :projects
def email_required?
false
end
def email_changed?
false
end
I removed 'validatable'
And tried change model
change_column :users, :email, :string, :null => true
remove_index :users, :email
Also I set configuration device.rb
config.authentication_keys = [:username]
config.case_insensitive_keys = [:username]
config.strip_whitespace_keys = [:username]
But I still have an error
"Email can't be blank",
"Email is not an email"
What I made wrong? Thank You