Skip to content

Commit

Permalink
Merge pull request #4163 from benwbrum/4162-owner-with-space-in-usern…
Browse files Browse the repository at this point in the history
…ame-cannot-create-collection

This looks great!
  • Loading branch information
benwbrum authored Jun 17, 2024
2 parents 9bc616f + 6ee934a commit 4e8ed28
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class User < ApplicationRecord

validates :login, presence: true,
uniqueness: { case_sensitive: false },
format: { with: /\A[^<> ]*\z/,
format: { with: /\A[^<>]*\z/,
message: ->(_, _) { I18n.t('devise.errors.messages.login.format') } },
exclusion: { in: %w[transcribe translate work collection deed],
message: ->(_, _) { I18n.t('devise.errors.messages.login.exclusion') } }
Expand Down
2 changes: 1 addition & 1 deletion config/locales/devise/devise-de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ de:
messages:
login:
exclusion: ist ungültig
format: darf keine spitzen Klammern (<, >) oder Leerzeichen enthalten
format: darf keine spitzen Klammern (<, >) enthalten
failure:
already_authenticated: Sie sind bereits angemeldet.
inactive: Ihr Benutzerkonto ist noch nicht aktiviert.
Expand Down
2 changes: 1 addition & 1 deletion config/locales/devise/devise-en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ en:
messages:
login:
exclusion: is invalid
format: can't contain angle brackets (<, >) or spaces
format: can't contain angle brackets (<, >)
failure:
already_authenticated: You are already signed in.
inactive: Your account is not activated yet.
Expand Down
2 changes: 1 addition & 1 deletion config/locales/devise/devise-es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ es:
messages:
login:
exclusion: ist ungültig
format: darf keine spitzen Klammern (<, >) oder Leerzeichen enthalten
format: no puede contener corchetes angulares (<, >)
failure:
already_authenticated: Ya has iniciado sesión.
inactive: Tu cuenta aún no ha sido activada.
Expand Down
2 changes: 1 addition & 1 deletion config/locales/devise/devise-fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fr:
messages:
login:
exclusion: n'est pas valide
format: ne peut pas contenir de crochets angulaires (<, >) ou d'espaces
format: ne peut pas contenir de chevrons (<, >)
failure:
already_authenticated: Vous êtes déjà connecté.
inactive: Votre compte n'est pas encore activé.
Expand Down
2 changes: 1 addition & 1 deletion config/locales/devise/devise-pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pt:
messages:
login:
exclusion: não é válido
format: não pode conter sinais de maior ou menor (<, >) ou espaços
format: não pode conter colchetes angulares (<, >)
failure:
already_authenticated: Você já entrou na sua conta.
inactive: A sua conta ainda não foi ativada.
Expand Down

0 comments on commit 4e8ed28

Please sign in to comment.