Game Development Reference
In-Depth Information
email address, the browser will tell the user that there is a problem and the form will
not be submitted.
In the game, we use this feature whenever a player wins, by asking the user to enter
his or her full name and email address. That information is used in a leaderboard,
like you have probably seen in older games. While the user is not forced to enter any
of the information asked for in the form, if the user does choose to input any inform-
ation the data will be validated automatically by the browser.
The exciting thing about automatic form validation is that you can customize your
form through the HTML attributes included, making only required fields validated,
what the error message says, and so on so forth. Also, even if the user disables
JavaScript functionality in the browser the form will still be validated and handled by
the browser. Of course, as you well know, one of the main rules about taking input
from the user is that you should never trust the user and always validate and sanitize
any, and all user input in the server as well.
Search WWH ::




Custom Search