mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: Add validation for website and remove validation for library item name (#4269)
* Github->GitHub * allow numbers * remove validation for lib/item name
This commit is contained in:
parent
34a382ace9
commit
e4d02fb275
2 changed files with 4 additions and 5 deletions
|
@ -120,9 +120,6 @@ const PublishLibrary = ({
|
|||
if (!libItem.name) {
|
||||
error = t("publishDialog.errors.required");
|
||||
isError = true;
|
||||
} else if (!/^[a-zA-Z\s]+$/i.test(libItem.name)) {
|
||||
error = t("publishDialog.errors.letter&Spaces");
|
||||
isError = true;
|
||||
}
|
||||
erroredLibItems.push({ ...libItem, error });
|
||||
});
|
||||
|
@ -381,6 +378,8 @@ const PublishLibrary = ({
|
|||
<input
|
||||
type="text"
|
||||
name="website"
|
||||
pattern="https?://.+"
|
||||
title={t("publishDialog.errors.website")}
|
||||
value={libraryData.website}
|
||||
onChange={onInputChange}
|
||||
placeholder={t("publishDialog.placeholder.website")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue