lib/faastruby/cli/commands/account/signup.rb in faastruby-0.5.15 vs lib/faastruby/cli/commands/account/signup.rb in faastruby-0.5.16
- old
+ new
@@ -1,9 +1,9 @@
module FaaStRuby
module Command
module Account
- PASSWORD_REGEX = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,20}$/
+ PASSWORD_REGEX = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&])[A-Za-z\d@$!%*?&]{8,50}$/
EMAIL_REGEX = /\A([\w+\-].?)+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+\z/i
require 'faastruby/cli/commands/account/base_command'
require 'io/console'
class Signup < AccountBaseCommand
def initialize(args)
@@ -19,14 +19,14 @@
until email_is_valid?(email) do
puts "You entered an invalid email address. Please try again:".red
print "Email: "
email = STDIN.gets.chomp
end
- puts "\nNow type in a password. It must contain 8 to 20 characters and have at least one uppercase letter, one lowercase letter, one number and one special character @ $ ! % * ? &"
+ puts "\nNow type in a password. It must contain 8 to 50 characters and have at least one uppercase letter, one lowercase letter, one number and one special character @ $ ! % * ? &"
print "Password: "
password = STDIN.noecho(&:gets).chomp
until password_is_valid?(password) do
- puts "\nYour password must contain 8 to 20 characters and have at least one uppercase letter, one lowercase letter, one number and one special character @ $ ! % * ? &\nPlease try again:".red
+ puts "\nYour password must contain 8 to 50 characters and have at least one uppercase letter, one lowercase letter, one number and one special character @ $ ! % * ? &\nPlease try again:".red
print "Password: "
password = STDIN.noecho(&:gets).chomp
end
spinner = spin("Creating your account...")
user = User.create(email: email, password: password)