Project

General

Profile

« Previous | Next » 

Revision d3d4a9b0

Added by Marc Dequènes almost 16 years ago

  • ID d3d4a9b05069f17bd7177754f74815711550765a

[fix] improve password validation #2

View differences:

app/models/user.rb
validates_uniqueness_of :login
validates_uniqueness_of :real_name, :email, :allow_nil => true
validates_length_of :login, :within => 3..64, :allow_nil => true
validates_length_of :password, :within => 4..128, :if => :password_changed?, :allow_nil => true
validates_length_of :password, :within => 4..128, :if => :password_changed?, :allow_nil => true, :allow_blank => true
validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i, :message => _("Invalid email"), :allow_blank => true
attr_protected :id, :salt

Also available in: Unified diff