class Schedule < ApplicationRecord validates :temperature, presence: true, numericality: true, format: { with: /\A\d+(\.\d)?\z/ } end