jeudi 17 décembre 2015

Value greater than 0.1

I am working on an old version of rails 3.2. The column is a string and I need to validate that the value is <= 0.1. From the documentation states "By default, it will match an optional sign followed by an integral or floating point number".

validates :min_amount, numericality: { greater_than_or_equal_to: 0.1 }

But even when I submit 0.5 it says it's not greater than or equal to 0.1

Aucun commentaire:

Enregistrer un commentaire