Skip to content

fix(frontend): add Company Website field with URL validation in Conta… - #4037

Open
Nancy-3012 wants to merge 1 commit into
riteshbonthalakoti:gssocfrom
Nancy-3012:fix/company-website-url-validation
Open

fix(frontend): add Company Website field with URL validation in Conta…#4037
Nancy-3012 wants to merge 1 commit into
riteshbonthalakoti:gssocfrom
Nancy-3012:fix/company-website-url-validation

Conversation

@Nancy-3012

Copy link
Copy Markdown

🎯 Summary

Resolves #4033 by adding a Company Website field to the ContactSales form with URL format validation, rejecting invalid inputs like abc123A!1 that are not valid website URLs.


🛠️ Changes Made

Frontend/src/pages/ContactSales.tsx

Added website field to formData state:

  • New optional field for company website URL

Added URL validation in handleSubmit():

  • Validated against /^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/i
  • Accepts formats like https://company.com, http://acme.org, company.com
  • Rejects plain text values like abc123A!1
  • Field is optional — empty value skips validation

Added Company Website input field in the form:

  • Placed after Company Name field
  • Input type url for browser-level validation
  • Placeholder: https://company.com

✅ Fixes

  • abc123A!1 rejected with clear alert message
  • Plain text values blocked
  • Valid URLs accepted (https://company.com, company.com)
  • Field is optional — empty value passes validation
  • No breaking changes to existing form fields

Closes #4033

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

@Nancy-3012 is attempting to deploy a commit to the ritesh Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: a008a560-4054-423e-b0d9-75e6bd71b9be

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant