Skip to content

Commit

Permalink
Fix non required number validation
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoFelipe committed Jan 13, 2024
1 parent 9f3466f commit 17be252
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/admissions/filled_form_field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ def validate_value_required(configuration)
end

def validate_number_field(configuration)
return true if self.value.blank?
!!Float(self.value)
rescue
add_error(:invalid_number)
Expand Down

0 comments on commit 17be252

Please sign in to comment.