I have model Customer payment as bellow ,
class Customerpayment < ActiveRecord::Base
#validation
  validates :amount ,   numericality: { greater_than_or_equal_to: 0 }
  validates :amount ,   presence: true
  validates :date   ,   presence: true
  validates_each :amount do |record, attr, value|
    record.errors.add(attr, I18n.t(:invalid_paid)) if !valid_paid_amount(record , value) 
  end
end
- the problem is the validation  validates_each :amount works before validates :amount ,     presence: true and I want the last to work first , any help please to get validation validates :amount ,     presence: true work first