MCPcopy Index your code
hub / github.com/simstudioai/sim / validateDomain

Function validateDomain

apps/sim/ee/sso/components/sso-settings.tsx:215–222  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

213 }
214
215 const validateDomain = (value: string): string[] => {
216 const out: string[] = []
217 if (!value || !value.trim()) return ['Domain is required.']
218 if (/^https?:\/\//i.test(value.trim())) out.push('Do not include protocol (https://).')
219 if (!/^[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/.test(value.trim()))
220 out.push('Enter a valid domain like company.com')
221 return out
222 }
223
224 const validateRequired = (label: string, value: string): string[] => {
225 const out: string[] = []

Callers 1

validateAllFunction · 0.85

Calls 2

testMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected