Skip to content

Commit

Permalink
UDCSL #202 - Adding numeric validation for user_defined_field order
Browse files Browse the repository at this point in the history
  • Loading branch information
dleadbetter committed May 2, 2023
1 parent 3ee864c commit 3c1551e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/user_defined_fields/user_defined_field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ class UserDefinedField < ApplicationRecord
# Resourceable parameters
allow_params :table_name, :column_name, :data_type, :required, :searchable, :allow_multiple, :order, options: []

# Validations
validates :order, numericality: { only_integer: true }

# Constants
DATA_TYPES = {
boolean: 'Boolean',
Expand Down

0 comments on commit 3c1551e

Please sign in to comment.