HTML CSS examples for HTML Tag:input
The pattern attribute ensures that a value matches a regular expression.
Using the pattern Attribute
<!DOCTYPE html> <html> <head> <title>Example</title> </head> <body> <form method="post" action="http://example.com/form"> <input type="hidden" name="recordID" value="1234"> <p> <label for="name"> Name: <!-- ww w. j a v a 2 s .co m--> <input type="text" id="name" name="name" pattern="^.* .*$"> </label> </p> <p> <label for="password"> Password: <input type="password" placeholder="Min 6 characters" id="password" name="password"> </label> </p> <input type="submit" value="Submit"> </form> </body> </html>