Commit e8b9c61c89724db2964b9b18eff7b84ddb6a61ca
1 parent
14bd143c
Exists in
master
and in
1 other branch
Fix siorg_code validation on Institutions
Signed-off-by: Marcos Ronaldo <marcos.rpj2@gmail.com> Signed-off-by: Tallys Martins <tallysmartins@gmail.com>
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
src/noosfero-spb/gov_user/lib/institution.rb
... | ... | @@ -49,7 +49,7 @@ class Institution < ActiveRecord::Base |
49 | 49 | :verify_institution_type |
50 | 50 | |
51 | 51 | validates :siorg_code, |
52 | - format: {with: /\A[0-9]+\z/, message: _("invalid, only numbers are allowed.")}, | |
52 | + numericality: {only_integer: true, message: _("invalid, only numbers are allowed.")}, | |
53 | 53 | allow_blank: true |
54 | 54 | |
55 | 55 | def has_accepted_rating? user_rating | ... | ... |