Require email for registration.

This commit is contained in:
2025-07-22 07:26:18 +02:00
parent c03b27b960
commit 87471e033e
3 changed files with 11 additions and 7 deletions

4
app.py
View File

@@ -638,6 +638,8 @@ def register():
error = None
if not username:
error = 'Username is required'
elif not email:
error = 'Email is required'
elif not password:
error = 'Password is required'
elif password != confirm_password:
@@ -799,6 +801,8 @@ def register_freelancer():
error = None
if not username:
error = 'Username is required'
elif not email:
error = 'Email is required'
elif not password:
error = 'Password is required'
elif password != confirm_password:

View File

@@ -178,9 +178,9 @@
<div class="form-group input-icon">
<i>📧</i>
<input type="email" id="email" name="email" class="form-control" placeholder="your@email.com (optional)">
<label for="email">Email Address (Optional)</label>
<small class="form-text text-muted">Recommended for account recovery and notifications</small>
<input type="email" id="email" name="email" class="form-control" placeholder="your@email.com" required>
<label for="email">Email Address</label>
<small class="form-text text-muted">Required for account verification and recovery</small>
</div>
<div class="form-group input-icon">
@@ -234,7 +234,7 @@
</div>
<div class="verification-notice">
<p><i class="ti ti-bulb"></i> You can register without an email, but we recommend adding one for account recovery.</p>
<p><i class="ti ti-bulb"></i> A valid email address is required for registration. You will receive a verification email after signup.</p>
</div>
</form>
</div>

View File

@@ -47,9 +47,9 @@
<div class="form-group input-icon">
<i>📧</i>
<input type="email" id="email" name="email" class="form-control" placeholder="your@email.com (optional)">
<label for="email">Email Address (Optional)</label>
<small class="form-text text-muted">Recommended for account recovery</small>
<input type="email" id="email" name="email" class="form-control" placeholder="your@email.com" required>
<label for="email">Email Address</label>
<small class="form-text text-muted">Required for account verification and recovery</small>
</div>
<div class="form-group input-icon">