HTML & CSS form validation using pattern This example uses pattern attribute with Regular Expressions (RegEx) to validate inputs on a form.