In my model I have:
在我的模型中,我有:
validate :my_custom_validation
def my_custom_validation
errors.add_to_base("error message") if condition.exists?
end
validate :myIn my model I have:
在我的模型中,我有:
validate :my_custom_validation
def my_custom_validation
errors.add_to_base("error message") if condition.exists?
end
validate :my