Skip to content

Commit 3740f4a

Browse files
committed
Added required to login.html inputs
Without adding the required attribute to those inputs, the client-side validation in the help-block below the form (ng-show="form.email.$error.required && form.password.$error.required && submitted") will never actually catch and show the error without a request being sent to the server.
1 parent 2641e3e commit 3740f4a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

templates/views/html/partials/login.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ <h1>Login</h1>
1111
<div class="form-group">
1212
<label>Email</label>
1313

14-
<input type="text" name="email" class="form-control" ng-model="user.email">
14+
<input type="text" name="email" class="form-control" ng-model="user.email" required>
1515
</div>
1616

1717
<div class="form-group">
1818
<label>Password</label>
1919

20-
<input type="password" name="password" class="form-control" ng-model="user.password">
20+
<input type="password" name="password" class="form-control" ng-model="user.password" required>
2121
</div>
2222

2323
<div class="form-group has-error">
@@ -37,4 +37,4 @@ <h1>Login</h1>
3737
<hr>
3838
Not registered? <a href="/signup" class="text-center new-account">Create an account.</a>
3939
</div>
40-
</div>
40+
</div>

0 commit comments

Comments
 (0)