🐛 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 checkIfPathnameIsValid = (pathname: string) => {
|
||||||
const isCorrectlyFormatted =
|
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) {
|
if (!isCorrectlyFormatted) {
|
||||||
showToast({
|
showToast({
|
||||||
|
|||||||
Reference in New Issue
Block a user