There is something like this:

main .form-control { display: inline-block; width: auto; } 
 <!-- head --> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/> <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> <!-- head end --> <main> <form action="/register" method="post"> <fieldset> <div class="form-group"> <input autocomplete="off" autofocus="" class="form-control" name="email" placeholder="E-mail" type="text" required /> </div> <div class="form-group"> <input autocomplete="off" autofocus="" class="form-control" name="username" placeholder="Name" type="text" /> </div> <div class="form-group"> <input class="form-control" name="password" placeholder="Password" type="password" required /> </div> <div class="form-group"> <input class="form-control" name="confirmation" placeholder="Password (again)" type="password" required /> <!--pattern ???--> </div> <div class="form-group"> <button class="btn btn-default" type="submit">Register</button> <button class="btn btn-default" type="reset">Reset</button> </div> </fieldset> </form> </main> 

The question is, is it possible to access the password field from the confirmation by pattern field (or in any other way) to compare these two fields without resorting to the JS function?

0