Guest User

Untitled

a guest
May 27th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. class User < ActiveRecord::Base
  2. acts_as_authentic :login_field => 'login', :validate_fields => false
  3. validates_presence_of :login
  4. validates_confirmation_of :password
  5. =begin
  6. :login_field_validation_options => { :message => '^Debe ingresar su nombre de usuario.' },
  7. :login_field_validates_length_of_options => { :allow_blank => true,
  8. :within => 2..20,
  9. :too_short => '^Nombre de usuario muy corto',
  10. :too_long => '^Nombre de usuario muy largo.'},
  11. :login_field_validates_format_of_options => { :with => /^[a-zA-Z0-9]$/,
  12. :allow_blank => true,
  13. :message => '^Nombre de usuario invalido, debe usar solo numeros y letras.' },
  14. :email_field_validation_options => { :message => '^Debe ingresar su Email.' },
  15. :email_field_validates_length_of_options => { :allow_blank => true,
  16. :within => 6..50,
  17. :too_short => '^Email muy corto',
  18. :too_long => '^Email es muy largo.'}
  19. =end
  20. end
Add Comment
Please, Sign In to add comment