CodeMontageHQ / codemontage

CodeMontage empowers coders to improve their impact on the world. Find open source software projects with a social impact and save the world.
http://codemontage.com
GNU General Public License v3.0
80 stars 79 forks source link

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

Open DBNess opened 10 years ago

DBNess commented 10 years ago

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

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

DBNess commented 10 years ago

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 commented 10 years ago

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

image

DBNess commented 10 years ago

@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 commented 9 years ago

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 commented 9 years ago

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

selection_005