mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 14:41:28 -07:00
7 lines
199 B
TypeScript
7 lines
199 B
TypeScript
export function nameValidator(value: string) {
|
|
if (!/^[a-z][a-z0-9-]*$/.test(value)) {
|
|
return 'Must start with a letter and contain only lowercase letters, numbers, and hyphens'
|
|
}
|
|
return true
|
|
}
|