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:
parent
1e667b3e65
commit
3374ea72ef
2 changed files with 3 additions and 3 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue