Closed WilliamHester closed 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.
Please don't close the issue until the changes have been merged into master
Ah, sorry about that. Hopefully they will be merged soon!
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
Cool! I didn't realize that was a thing. I'll definitely add that to my next commits
This change has been added to master. Can I close this issue now?
Sure
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.