Practical JavaScript for the Usable Web
While validating input data on the server is essential, using JavaScript to validate data on the client as well is both simple to do and user-friendly. In this excerpt we examine a client-side function that tests the validity of a credit card number.