🐛 Fix public id validation
Did not work with this kind of path: test-a-test Closes #512
This commit is contained in:
@ -54,7 +54,7 @@ export const SharePage = () => {
|
||||
|
||||
const checkIfPathnameIsValid = (pathname: string) => {
|
||||
const isCorrectlyFormatted =
|
||||
/^([a-z0-9]+-[a-z0-9]+)*$/.test(pathname) || /^[a-z0-9]*$/.test(pathname)
|
||||
/^([a-z0-9]+-[a-z0-9]*)*$/.test(pathname) || /^[a-z0-9]*$/.test(pathname)
|
||||
|
||||
if (!isCorrectlyFormatted) {
|
||||
showToast({
|
||||
|
Reference in New Issue
Block a user