User Validations
class User < ApplicationRecord has_secure_passwordvalidates :username, presence: true validates :username, uniqueness: true validates :username, length: { minimum: 4 } validates :email, presence: true validates :email, uniqueness: truevalidates_format_of :email, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i end
This is a really authentic and informative blog. Share more posts like this.
ReplyDeleteHow To Learn German Easily
Learn German Easily
Excellent Blog, I like your blog and It is very informative. Thank you
ReplyDeleteBest online swift course
Learn Swift Programming Online
Thanks For sharing the blog..Watingfor next update..
ReplyDeleteJava Online Training
Best Java Course Online