I'm trying to validate a form field in a Rails app one of two ways, depending on the params passed in. If my object has the param `allow_negative: true`, I want:

```
validates :amount, numericality: {less_than_or_equal_to: 0}

```

otherwise I want:

```
validates :amount, numericality: {greater_than_or_equal_to: 0}

```

When I try to just do this: 

```
validates :amount, numericality: {greater_than_or_equal_to: 0}, unless: :allow_negative
validates :amount, numericality: {less_than_or_equal_to: 0}, if: :allow_negative

```

It just executes the second instance of `validates :amount`

For reference, here is my entire class:

```
class ViewModel
    include ActiveModel::Model

    validates :description, presence: true
    validates :amount, numericality: {greater_than_or_equal_to: 0}, unless: :allow_negative
    validates :amount, numericality: {less_than_or_equal_to: 0}, if: :allow_negative

    attr_reader :amount
    attr_reader :description
    attr_reader :allow_negative
    attr_reader :order

    def initialize(user, params)
      @amount = params[:amount]
      @description = params[:description]
      @allow_negative = params[:allow_negative]
      @order = Order.find(params[:order_id])
    end

  end

```