Thanks.

The documentation at: http://www.datamapper.org/doku.php?id=docs:validations
only
showed this:

validates_length :change_summary, :min => 10, :unless => :new_record?

I was looking to validate :only on create which you thanfully
provided.

I tried to find the API for dm-validations but could not find it.
Does anyone know where that is?

On Mar 4, 10:31 am, Jonathan Stott <[email protected]> wrote:
> On Wed, 4 Mar 2009 10:13:28 -0800 (PST)
>
> sbtodd <[email protected]> wrote:
>
> > Is there a way to validate only on the creationg of a record?
>
> > For instance, in a User model I would like to avoid these validations
> > when I update a User record:
>
> > validates_present :password_confirmation
> > validates_is_confirmed :password
>
> Hey
>
> Check outhttp://www.datamapper.org/doku.php?id=docs:validations
>
> Most specifically ':if => :new_record?'
>
> Regards,
> Jon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to