I''m having issues with the validation process. Some of it works fine
and
others don''t and I do not know why. in this case the last 3 validations
below do not work at all. I''m I doing something wrong? this should be
pretty straight forward, so I thought.
validates_presence_of     :login, :email
validates_presence_of     :password,                   :if =>
:password_required?
validates_presence_of     :password_confirmation,      :if =>
:password_required?
validates_length_of       :password, :within => 4..40, :if =>
:password_required?
validates_confirmation_of :password,                   :if =>
:password_required?
validates_length_of       :login,    :within => 4..40
validates_length_of       :email,    :within => 4..100
validates_uniqueness_of   :login, :email, :case_sensitive => false
validates_format_of       :email, :with =>
/^([^@\s]+)@((?:[-a-z0-9]+.)+[a-z]{2,})$/i
validates_format_of       :login, :with => /\w/i
validates_exclusion_of    :login, :in => %w{ sessions upload weborb
signup corp random}
-- 
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---