Highlight required fields

Why have you created a validator instead of using the following?

    validates :name, presence: true, unless: "metric.compound == false"
    validates :script, presence: true, unless: "metric.compound == false"