Merge pull request #1675 from consul/registration-polish

Removes unused validation
This commit is contained in:
Juanjo Bazán
2017-06-21 13:44:09 +02:00
committed by GitHub
2 changed files with 1 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ App.RegistrationForm =
$("small").remove()
showUsernameMessage = (response) ->
klass = if response.available then "error no-error" else "error error"
klass = if response.available then "no-error" else "error"
usernameInput.after $("<small class=\"#{klass}\" style=\"margin-top: -16px;\">#{response.message}</small>")
validateUsername = (username) ->

View File

@@ -42,9 +42,6 @@ class User < ActiveRecord::Base
validates :official_level, inclusion: {in: 0..5}
validates :terms_of_service, acceptance: { allow_nil: false }, on: :create
validates :locale, inclusion: {in: I18n.available_locales.map(&:to_s),
allow_nil: true}
validates_associated :organization, message: false
accepts_nested_attributes_for :organization, update_only: true