Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User & Coach sign up forms don't reject wrong submissions #48

Open
jendiamond opened this issue Sep 8, 2016 · 0 comments
Open

User & Coach sign up forms don't reject wrong submissions #48

jendiamond opened this issue Sep 8, 2016 · 0 comments
Assignees

Comments

@jendiamond
Copy link
Owner

jendiamond commented Sep 8, 2016

Pull Request #81

The users/new and the coach/new sign up forms don't reject wrong submissions.


Add validations

app/models/coaches.rb

class Coach < ApplicationRecord
  validates :first_name, presence: true
  validates :first_name, length: { minimum: 2 }
  validates :first_name, length: { minimum: 30 }
  validates :last_name, presence: true
  validates :last_name, length: { minimum: 2 }
  validates :last_name, length: { minimum: 30 }
  validates :email, presence: true
  validates :days, presence: true
  validates :operating_system, presence: true
end

http://guides.rubyonrails.org/active_record_validations.html
http://stackoverflow.com/questions/16725010/rails-simple-form-validation

@jendiamond jendiamond self-assigned this Sep 8, 2016
@jendiamond jendiamond changed the title Sign up form doesn't reject wrong submissions User & Coach sign up forms don't reject wrong submissions Oct 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant