<p>In my model I have:</p>

<pre><code>validate :my_custom_validation

def my_custom_validation
 errors.add_to_base("error message") if condition.exists?
end
</code></pre>

<p>I would like to add some parameters to mycustomer vaildation like so:</p>

<pre><code>validate :my_custom_validation, :parameter1 =&gt; x, :parameter2 =&gt; y
</code></pre>

<p>How do I write the mycustomvalidation function to account for parameters? </p>

You can just do something like this:
```
```
def validate
  errors.add('That particular field', 'can not be the value you presented') if !self.field_to_check.blank? && self.field_to_check == 'I AM COOL'
end
```
```
No need to call reference it, as I believe the validate method is processed (if it exists) after any validates_uniqueness_of -like validations.
Added: More information in the Rails API docs
here
.