Rails - validate Float type when it's still a String
===

I have **User** model with **:balance** field (it is **float** type). I want to write my own validation for this field, but i want to get access to this value when it's still a string and Rails didn't yet converted it to the float. I mean, i want to do something like this:

    class User < ActiveRecord::Base
      validate :check_balance
    
      def check_balance
        if balance.is_a?(String)
          // do my validation, add errors and etc.
        end
      end
    end

How can i do that?

P.S. **validates_format_of** is not answer in my current situation.