make simple_form see that first_name is required

This commit is contained in:
wvengen 2013-12-03 22:03:19 +01:00
parent 8a1b0386eb
commit b1e81dc1d7

View file

@ -28,6 +28,7 @@ class User < ActiveRecord::Base
validates_presence_of :password, :on => :create
validates_format_of :email, :with => /^([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})$/i
validates_uniqueness_of :email, :case_sensitive => false
validates_presence_of :first_name # for simple_form validations
validates_length_of :first_name, :in => 2..50
validates_confirmation_of :password
validates_length_of :password, :in => 5..25, :allow_blank => true