Making the project, you need that when you enter the email he did not accept anything if there is no '@'. In theory, this code should be working, since searching on the Internet came across an identical code and there it gives an error if it does not see '@' during registration. I tried to use the "required pattern", but as I understand it, it is better to use it, where one hundred percent only 2 options that you can choose.
<!DOCTYPE html> <html th:lang="#{language_code}" xmlns:th="http://www.thymeleaf.org"> <head th:replace="fragments/Head :: head"></head> <body> <nav th:replace="fragments/Navigation :: navigation"></nav> <div class="container margin-tb"> <h1 class="mb-4"th:text="#{sign_in}"></h1> <form action="/index/" method="post"> <div class="form-group"> <label for="email"><strong th:text="#{email}"></strong></label> <input type="email" class="form-control" placeholder="Enter email" id="email" name="email" arie-describedby="EmailHelp" required title= "Here you put email, my brother"> </div> <div class="form-group"> <label for="password"><strong th:text="#{password}"></strong></label> <input type="password" class="form-control" placeholder="Enter a password" id="password" name="password" required title="Here put password, my brother"> </div> <div class="form-group"> <div class="form-check"> <input type="checkbox" class="form-check-input" checked="checked" id="remember" name="remember"> <label class="form-check-label" for="remember">Remember me</label> </div> </div> <button type="submit" class="btn btn-primary" th:text="#{login_button}"</button> <hr> <span class="psw">Forgot <a href="#">password?</a></span> </form> </div> </body> </html> Below is the code I clicked on.
<form> <div class="form-group"> <label for="exampleInputEmail1">Email address</label> <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email"> <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small> </div> <div class="form-group"> <label for="exampleInputPassword1">Password</label> <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password"> </div> <div class="form-check"> <input type="checkbox" class="form-check-input" id="exampleCheck1"> <label class="form-check-label" for="exampleCheck1">Check me out</label> </div> <button type="submit" class="btn btn-primary">Submit</button> </form>