mirror of
https://github.com/garethgeorge/backrest.git
synced 2026-09-26 01:45:43 +00:00
fix: relax name regex for plans and repos
This commit is contained in:
@@ -1 +0,0 @@
|
||||
export const nameRegex = /^[a-zA-Z0-9_\-]+$/;
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user