validation problem

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 =>
validates_presence_of :password_confirmation, :if =>
validates_length_of :password, :within => 4..40, :if =>
validates_confirmation_of :password, :if =>
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 =>
validates_format_of :login, :with => /\w/i
validates_exclusion_of :login, :in => %w{ sessions upload weborb
signup corp random}