Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 17cf2a9

Browse files
Client side validation and registration.
1 parent 1b4c564 commit 17cf2a9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎code/ch6-users-and-forms/templates/account/register.pt‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
<form action="" method="POST" class="account-form">
55
<h1>Register at PyPI</h1>
66

7-
<input name="name" type="text" placeholder=" Your name" class="form-control" value="${ name }">
8-
<input name="email" type="text" placeholder=" Your email address" class="form-control" value="${ email }">
9-
<input name="password" type="password" placeholder=" Password" class="form-control" value="${ password }">
10-
<input name="age" type="number" placeholder=" Your age in years" style="display: block; width: 100%">
7+
<input name="name" type="text" placeholder=" Your name" class="form-control" value="${ name }" required>
8+
<input name="email" type="email" placeholder=" Your email address" class="form-control" value="${ email }" required>
9+
<input name="password" minlength="5"type="password" placeholder=" Password" class="form-control" value="${ password }" required>
10+
<input name="age" type="number" min="18"max="120"placeholder=" Your age in years" style="display: block; width: 100%" required>
1111
<button type="submit" class="btn btn-danger">Register</button>
1212
<div style="clear: both;"></div>
1313

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /