Make phone required on registration, fix deploy hook npx path

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
King Omar 2026-07-10 13:01:20 +10:00
parent 1e667b3e65
commit 3374ea72ef
2 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,7 @@ app.post('/register', async c => {
const confirm = form.get('confirm_password') || '';
const vals = { full_name: fullName, email, phone };
if (!fullName || !email || !password) return c.html(registerPage('All required fields must be filled in.', vals));
if (!fullName || !email || !phone || !password) return c.html(registerPage('All required fields must be filled in, including phone number.', vals));
if (password.length < 8) return c.html(registerPage('Password must be at least 8 characters.', vals));
if (password !== confirm) return c.html(registerPage('Passwords do not match.', vals));

View file

@ -568,8 +568,8 @@ function registerPage(error, values = {}) {
<input type="text" name="full_name" required placeholder="Your full name" value="${esc(values.full_name||'')}">
</div>
<div class="form-group">
<label>Phone</label>
<input type="tel" name="phone" placeholder="+61 4XX XXX XXX" value="${esc(values.phone||'')}">
<label>Phone *</label>
<input type="tel" name="phone" required placeholder="+61 4XX XXX XXX" value="${esc(values.phone||'')}">
</div>
</div>
<div class="form-group">