Activerecord typecast

Use attributes values before type case for ActiveRecord objects

Otherwises ex. "10 200" still get typecasted to "10" before validations occurs.