forked from reddit-archive/reddit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better date validation, do not redirect if form has errors
Now, in addition to checking that the date has the correct format (YYYY-MM) we also check to make sure the date is in the future and the month is in the range 01 to 12. This fixes the problem where users were seeing a 500 server error after entering invalid values for the month when entering their credit card info. This change also fixes a problem where the form was redirecting even if there were validation errors, leading the user to believe their authorization was successful when it wasn't.
- Loading branch information
Showing
2 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters