<p>Hi,</p>
<p>There are a number of fields in the models which are validated for numericality, using the flag <code>integer_only</code>:</p>
<pre><code>[openstreetmap-website] $ grep -rin "integer_only" .
./app/models/old_node.rb:41:                       :numericality => { :integer_only => true }
./app/models/old_node.rb:43:                        :numericality => { :integer_only => true }
./app/models/note.rb:27:                 :numericality => { :on => :update, :integer_only => true }
./app/models/changeset_comment.rb:27:                 :numericality => { :on => :update, :integer_only => true }
./app/models/node.rb:50:                 :numericality => { :on => :update, :integer_only => true }
./app/models/node.rb:52:                      :numericality => { :integer_only => true }
./app/models/node.rb:54:                           :numericality => { :integer_only => true }
./app/models/node.rb:56:                       :numericality => { :integer_only => true }
./app/models/node.rb:58:                        :numericality => { :integer_only => true }
./app/models/way.rb:42:                 :numericality => { :on => :update, :integer_only => true }
./app/models/way.rb:44:                      :numericality => { :integer_only => true }
./app/models/way.rb:46:                           :numericality => { :integer_only => true }
./app/models/changeset.rb:46:                 :numericality => { :on => :update, :integer_only => true }
./app/models/changeset.rb:48:                      :numericality => { :integer_only => true }
./app/models/changeset.rb:50:                          :numericality => { :integer_only => true,
./app/models/changeset.rb:54:                                                    :numericality => { :integer_only => true }
./app/models/note_comment.rb:31:                 :numericality => { :on => :update, :integer_only => true }
./app/models/relation.rb:40:                 :numericality => { :on => :update, :integer_only => true }
./app/models/relation.rb:42:                      :numericality => { :integer_only => true }
./app/models/relation.rb:44:                           :numericality => { :integer_only => true }
</code></pre>
<p>However I believe the flag accepted by the Rails numericality API is <code>only_integer</code>, <em>not</em> <code>integer_only</code>. See <a href="https://github.com/rails/rails/blob/b9ca94caea2ca6a6cc09abaffaad67b447134079/activemodel/lib/active_model/validations/numericality.rb#L12">here</a>.</p>
<p>Perhaps the flag has changed since previous Rails versions? Nevertheless, the code linked above is from the app version of Rails (5.2.3), so it seems these numericality validations may now be silently ignored. Found this while analyzing the app as part of a research project. Happy to create a pull request if that's helpful (and others agree this is an issue). Thanks.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/issues/2355?email_source=notifications&email_token=AAK2OLPZZCFNDWIHWN6JXA3QFXXKBA5CNFSM4IOP6QVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HGVEBVA">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNMR5EAO7KVE7HVVM3QFXXKBANCNFSM4IOP6QVA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAK2OLPZ6OEQMD7PLVWPD4TQFXXKBA5CNFSM4IOP6QVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HGVEBVA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/issues/2355?email_source=notifications\u0026email_token=AAK2OLPZZCFNDWIHWN6JXA3QFXXKBA5CNFSM4IOP6QVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HGVEBVA",
"url": "https://github.com/openstreetmap/openstreetmap-website/issues/2355?email_source=notifications\u0026email_token=AAK2OLPZZCFNDWIHWN6JXA3QFXXKBA5CNFSM4IOP6QVKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HGVEBVA",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>