Skip to content

Commit 66dca8f

Browse files
Make Company optional in the UI (frontend-only)
Form labels Company 'optional', client validation no longer flags it as Required when blank, and the submit handler stubs '(not provided)' into the payload when the user leaves it empty so the worker's existing 'company required' contract stays untouched. Worker, schema, and DB are not changed. Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent c4590d7 commit 66dca8f

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

apps/marketing/src/pages/workspaces/index.astro

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,9 @@ const teamSizes = [
153153
<input type="email" name="email" placeholder="jane@company.com" autocomplete="email" maxlength="320" />
154154
</div>
155155
<div class="ws-field">
156-
<label class="ws-label">Company</label>
156+
<label class="ws-label">
157+
Company <span class="ws-opt">optional</span>
158+
</label>
157159
<input type="text" name="company" placeholder="Acme Inc." autocomplete="organization" maxlength="160" />
158160
</div>
159161
</div>
@@ -475,7 +477,10 @@ const teamSizes = [
475477
else if (!/^[^\s@]+@[^\s@.]+\.[^\s@]+$/.test(email)) {
476478
showErr(get('email'), 'Looks invalid'); ok = false;
477479
}
478-
if (!company) { showErr(get('company'), 'Required'); ok = false; }
480+
// Company is presented as optional in the UI. The worker still
481+
// requires a non-empty value, so stub one here when the user
482+
// leaves it blank — keeps the server contract untouched.
483+
if (!company) company = '(not provided)';
479484
if (!team_size) {
480485
showErr(form.querySelector('[data-field="teamSize"]'), 'Pick one');
481486
ok = false;

0 commit comments

Comments
 (0)