Home / HTML Tips Generated By ChatGPT / Specifying Input Patterns with pattern in HTML Use the pattern attribute in elements to define a regex that the input’s value must match, useful for validating forms on the client side. Source Code