Sha256: e6b5c592317fb9206802bb181c0cde5faf7fc1c118924db07d2ab05fdee561ee
Contents?: true
Size: 344 Bytes
Versions: 9
Compression:
Stored size: 344 Bytes
Contents
require_relative "base" module RailsSettingsUi module ValueTypes class Float < RailsSettingsUi::ValueTypes::Base def cast value.to_f end def validate unless value_numeric? self.errors << I18n.t("settings.errors.invalid_numeric", default: 'Invalid') end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems