Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorNoah Leal <noahleal@me.com>2020-06-11 17:18:17 +0300
committerDennis Schubert <mail@dennis-schubert.de>2020-06-14 00:31:03 +0300
commitad91dddd6319f837d06881d8ef2c20a9722354e6 (patch)
tree43d7a1512d850c8c3be8d95e31324c0fbdf8ed62 /app
parent7193099902486429b4fcbbb567bbca2f3cbef6d4 (diff)
Issue #8119 - Add length validation to a profile's gender field.
closes #8127
Diffstat (limited to 'app')
-rw-r--r--app/models/profile.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/profile.rb b/app/models/profile.rb
index 74ca9fec6..7a615ffae 100644
--- a/app/models/profile.rb
+++ b/app/models/profile.rb
@@ -21,6 +21,7 @@ class Profile < ApplicationRecord
validates :first_name, :length => { :maximum => 32 }
validates :last_name, :length => { :maximum => 32 }
validates :location, :length => { :maximum =>255 }
+ validates :gender, length: {maximum: 255}
validates_format_of :first_name, :with => /\A[^;]+\z/, :allow_blank => true
validates_format_of :last_name, :with => /\A[^;]+\z/, :allow_blank => true