mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
feat: workspace name validation added (#767)
This commit is contained in:
parent
748e5e7fb7
commit
22c1f6f8e2
@ -112,6 +112,9 @@ export const CreateWorkspaceForm: React.FC<Props> = ({
|
|||||||
}
|
}
|
||||||
validations={{
|
validations={{
|
||||||
required: "Workspace name is required",
|
required: "Workspace name is required",
|
||||||
|
validate: (value) =>
|
||||||
|
/^[\w\s-]*$/.test(value) ||
|
||||||
|
`Name can only contain (" "), ( - ), ( _ ) & Alphanumeric characters.`,
|
||||||
}}
|
}}
|
||||||
placeholder="e.g. My Workspace"
|
placeholder="e.g. My Workspace"
|
||||||
error={errors.name}
|
error={errors.name}
|
||||||
|
Loading…
Reference in New Issue
Block a user