MCPcopy Create free account
hub / github.com/TanStack/query / validateProjectName

Function validateProjectName

examples/lit/pagination/server/index.mjs:156–171  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

154}
155
156function validateProjectName(name) {
157 if (typeof name !== 'string') {
158 return 'Project name must be a string'
159 }
160
161 const trimmed = name.trim()
162 if (trimmed.length < 3) {
163 return 'Project name must be at least 3 characters'
164 }
165
166 if (trimmed.length > 60) {
167 return 'Project name must be 60 characters or fewer'
168 }
169
170 return null
171}
172
173function validateOwner(owner) {
174 if (typeof owner !== 'string') {

Callers 1

index.mjsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected