validations rails integer suprior to 0 code example Example: validations rails integer suprior to 0 validates :cooking_time, numericality: { greater_than: 0 }