Using HTML5 Form Validation

In a Windows Store app, the easiest way to validate HTML form fields is to take advantage of the HTML5 validation attributes. Imagine, for example, that you want to create an HTML form that includes a form field for entering a Social Security number. In that case, you can use the required attribute to ensure that a value has been entered and you can use the pattern attribute to ensure that the value matches the pattern for a valid Social Security number.

Get Windows® 8.1 Apps with HTML5 and JavaScript Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.