AuburnACM / auacm

The Auburn ACM Website
Apache License 2.0
15 stars 3 forks source link

Problem names must be more than a number #53

Closed WilliamHester closed 7 years ago

WilliamHester commented 8 years ago

This is an odd edge-case, but as it stands, if you name a problem a number, say 12, then when you do any sort of get on the problem e.g. /api/problems/12, the problem with PID 12 will be returned. I like the idea of being able to access problems from their PID, so I think that we should restrict problems from being named only numeric values. In a way, this falls under form-validation, but I don't think anyone mentioned it.

Mac-Genius commented 7 years ago

I created a custom form validator that gives an error if the problem name is only numbers. It also disables the save button until it is correct.

BrandonLMorris commented 7 years ago

Please don't close the issue until the changes have been merged into master

Mac-Genius commented 7 years ago

Ah, sorry about that. Hopefully they will be merged soon!

BrandonLMorris commented 7 years ago

No problem, and thank you for commenting so it's public that you're working on it.

You can actually mention issues in your PR, and when the PR gets merged the issue will automatically close. Just put something like "Fixes #53" in the PR description

Mac-Genius commented 7 years ago

Cool! I didn't realize that was a thing. I'll definitely add that to my next commits

Mac-Genius commented 7 years ago

This change has been added to master. Can I close this issue now?

BrandonLMorris commented 7 years ago

Sure