Fixes
This commit is contained in:
@@ -942,12 +942,19 @@
|
||||
<input
|
||||
id="guest-phone"
|
||||
type="tel"
|
||||
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none"
|
||||
class="flex h-10 w-full rounded-md border bg-background px-3 py-2 text-sm ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none {guestPhoneError
|
||||
? 'border-red-500'
|
||||
: 'border-input'}"
|
||||
placeholder="07700 900000"
|
||||
value={guestPhone}
|
||||
oninput={(e) => { guestPhone = e.currentTarget.value; }}
|
||||
onblur={() => { if (guestPhone && !isValidUKPhone(guestPhone)) guestPhoneError = 'Invalid UK phone number'; else guestPhoneError = ''; }}
|
||||
class={guestPhoneError ? 'border-red-500' : ''}
|
||||
oninput={(e) => {
|
||||
guestPhone = e.currentTarget.value;
|
||||
}}
|
||||
onblur={() => {
|
||||
if (guestPhone && !isValidUKPhone(guestPhone))
|
||||
guestPhoneError = 'Invalid UK phone number';
|
||||
else guestPhoneError = '';
|
||||
}}
|
||||
/>
|
||||
{#if guestPhoneError}
|
||||
<p class="mt-1 text-xs text-red-600">{guestPhoneError}</p>
|
||||
|
||||
@@ -625,12 +625,19 @@
|
||||
<input
|
||||
id="guest-phone"
|
||||
type="tel"
|
||||
class="flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none"
|
||||
placeholder="07700 900000 (optional — helps us reach you if running late)"
|
||||
class="flex h-10 w-full rounded-md border bg-background px-3 py-2 text-sm ring-offset-background focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-none {guestPhoneError
|
||||
? 'border-red-500'
|
||||
: 'border-input'}"
|
||||
placeholder="07700 900000"
|
||||
value={guestPhone}
|
||||
oninput={(e) => { guestPhone = e.currentTarget.value; }}
|
||||
onblur={() => { guestPhoneError = guestPhone && !isValidUKPhone(guestPhone) ? 'Invalid UK phone number' : ''; }}
|
||||
class={guestPhoneError ? 'border-red-500' : ''}
|
||||
oninput={(e) => {
|
||||
guestPhone = e.currentTarget.value;
|
||||
}}
|
||||
onblur={() => {
|
||||
if (guestPhone && !isValidUKPhone(guestPhone))
|
||||
guestPhoneError = 'Invalid UK phone number';
|
||||
else guestPhoneError = '';
|
||||
}}
|
||||
/>
|
||||
{#if guestPhoneError}
|
||||
<p class="mt-1 text-xs text-red-600">{guestPhoneError}</p>
|
||||
|
||||
Reference in New Issue
Block a user