fix: relax name regex for plans and repos

This commit is contained in:
garethgeorge
2024-01-23 22:56:11 -08:00
parent bedb302a02
commit ee6134af76
3 changed files with 0 additions and 11 deletions
-1
View File
@@ -1 +0,0 @@
export const nameRegex = /^[a-zA-Z0-9_\-]+$/;
-5
View File
@@ -17,7 +17,6 @@ import { useShowModal } from "../components/ModalManager";
import { Plan, RetentionPolicy } from "../../gen/ts/v1/config_pb";
import { useRecoilState } from "recoil";
import { configState, fetchConfig, updateConfig } from "../state/config";
import { nameRegex } from "../lib/patterns";
import { MinusCircleOutlined, PlusOutlined } from "@ant-design/icons";
import { URIAutocomplete } from "../components/URIAutocomplete";
import { useAlertApi } from "../components/Alerts";
@@ -163,10 +162,6 @@ export const AddPlanModal = ({
required: true,
message: "Please input plan name",
},
{
pattern: nameRegex,
message: "Invalid symbol",
},
{
validator: async (_, value) => {
if (template) return;
-5
View File
@@ -24,7 +24,6 @@ import {
updateConfig,
} from "../state/config";
import { useRecoilState } from "recoil";
import { nameRegex } from "../lib/patterns";
import { validateForm } from "../lib/formutil";
import { backrestService } from "../api";
@@ -180,10 +179,6 @@ export const AddRepoModal = ({
required: true,
message: "Please input plan name",
},
{
pattern: nameRegex,
message: "Invalid symbol",
},
{
validator: async (_, value) => {
if (template) return;