Reminder: Test Month Fields with September

A posting at DailyWTF reminds us that we should always test month edit boxes with September, especially when the user can enter 09:

See, Javascript supports octal numbers. Any number starting with a zero is octal, even if it can’t be an actual octal number. In certain languages, like Perl, trying to use a non-octal number as an octal number results in an error. In other languages, like Javascript, it silently fails.

This problem can also occur when the user selects the month from a drop-down list and converts it to a number for database purposes, so you should always test with September at least once in your testing.

Comments are closed.


wordpress visitors