diff options
author | Noah Leal <noahleal@me.com> | 2020-06-11 17:18:17 +0300 |
---|---|---|
committer | Dennis Schubert <mail@dennis-schubert.de> | 2020-06-14 00:31:03 +0300 |
commit | ad91dddd6319f837d06881d8ef2c20a9722354e6 (patch) | |
tree | 43d7a1512d850c8c3be8d95e31324c0fbdf8ed62 /app | |
parent | 7193099902486429b4fcbbb567bbca2f3cbef6d4 (diff) |
Issue #8119 - Add length validation to a profile's gender field.
closes #8127
Diffstat (limited to 'app')
-rw-r--r-- | app/models/profile.rb | 1 |
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 |