Is there a way to do this? Thanks for your help!!

On Tuesday, May 26, 2015 at 9:13:57 PM UTC-7, Jon Mattingly wrote:
>
> I'm trying to set up validations for a couple of my models, and would like 
> to use a custom error message. However, sequel validations add the column 
> name before the message. 
>
> So if I do a validates_unique on the :username column, it will say 
> 'username is taken' or whatever the message is I specify. I'd like to 
> remove the username part of it and just return :message.
>
> I saw an example in the docs for  'errors.add(:name, Sequel.lit("Album 
> name is not valid"))' but that seems like a mass solution with no way to 
> limit it to a validates_unique error. I'd only want to do it for some 
> columns.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to