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

Add client-side validation for non-null GitHub username #259

Open
1 task
DBNess opened this issue Sep 26, 2014 · 5 comments
Open
1 task

Add client-side validation for non-null GitHub username #259

DBNess opened this issue Sep 26, 2014 · 5 comments

Comments

@DBNess
Copy link
Member

DBNess commented Sep 26, 2014

Description
Add validation to GitHub username/organization field as well (follow-up from #166 #256 & #257):

clientsidevalidationstyling_after

Admins need to be able to create organizations without a :github_org, so this validation can only exist on the front end.

Ask / To Do

  • Add front end validation to the GitHub username/organization field.

Additional Info
We use the ClientSideValidations gem for front end validations.

@DBNess
Copy link
Member Author

DBNess commented Sep 26, 2014

This could be missing because this gem uses Rails validations, which are the following (i.e. organization.github_org is conditional):

Projects:

  validates_presence_of :name, :github_repo

Organizations:

  validates_presence_of :name
  validates_presence_of :github_org, :if => :is_public_submission

@thefenry
Copy link
Contributor

thefenry commented Dec 4, 2014

@DBNess,
Is this what you wanted? If so it seems that it was taken care of.

image

@DBNess
Copy link
Member Author

DBNess commented Dec 4, 2014

@thefenry - whoa! which environment is this screenshot from? Here's what Production looks like in Chrome for me when I try to submit an entirely blank project submission form:

codemontage

@thefenry
Copy link
Contributor

thefenry commented Dec 8, 2014

Hmm yeah weird. I see it not working on the deployed site but on my forked project it is working just fine. I am running rails 3.2.19 and ruby 2.0.0-481. All Gems installed and linux machine using chrome as the browser. Maybe someone made a pull request did not get linked to this issue perhaps?

@thefenry
Copy link
Contributor

Removed the conditional that was preventing the check. Now it works as expected.

selection_005

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

2 participants