Server side form validation 2
This commit is contained in:
@ -8,10 +8,14 @@
|
||||
<!-- <form method="post" action="" class="needs-validation" novalidate> -->
|
||||
<form method="post" action="" class="" novalidate>
|
||||
<input type="hidden" name="csrf_token" value="{{.CSRFToken}}">
|
||||
|
||||
<div class="form-group mt-5">
|
||||
<label for="first_name">First name:</label>
|
||||
<input type="text" name="first_name" id="first_name" class="form-control" required
|
||||
autocomplete="off">
|
||||
{{with .Form.Errors.Get "first_name"}}
|
||||
<label class="text-danger">{{.}}</label>
|
||||
{{end}}
|
||||
<input type="text" name="first_name" id="first_name" class="form-control {{with .Form.Errors.Get "first_name"}} is-invalid {{end}}"
|
||||
required autocomplete="off">
|
||||
</div>
|
||||
<div class="form-group mt-5">
|
||||
<label for="last_name">Last name:</label>
|
||||
|
Reference in New Issue
Block a user