Sha256: 7a0de4dab75671430d98d9d51fd98f7a3591f87d1afbb85dd2d34aef80c7c5d3
Contents?: true
Size: 365 Bytes
Versions: 2
Compression:
Stored size: 365 Bytes
Contents
require 'active_support/concern' module ThecoreBackendCommonsUser extend ActiveSupport::Concern included do validates :username, uniqueness: { case_sensitive: false }, presence: true, length: { in: 4..15 } validates_format_of :username, with: /\A[a-zA-Z0-9]*\z/, on: :create, message: "can only contain letters and digits" end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
thecore_backend_commons-2.2.7 | lib/concerns/thecore_backend_commons_user.rb |
thecore_backend_commons-2.2.6 | lib/concerns/thecore_backend_commons_user.rb |