mirror of
https://github.com/freedbygrace/DynamoDNS.git
synced 2026-08-29 11:46:55 +00:00
Checkpoint
Replit-Commit-Author: Agent Replit-Commit-Session-Id: 9111ef36-26c8-4085-84ca-a35dc1fec1b5 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7083d608-d6d3-4a6a-9a27-6286c5109627/24e018cf-bcea-47d6-ad75-1ad9ac058ac9.jpg
This commit is contained in:
@@ -46,9 +46,14 @@ import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
import { Loader2 } from "lucide-react";
|
||||
|
||||
// Domain name regex
|
||||
const domainRegex = /^((?!-)[A-Za-z0-9-]{1,63}(?<!-)\.)+[A-Za-z]{2,}$/;
|
||||
|
||||
// Domain form schema
|
||||
const domainFormSchema = z.object({
|
||||
name: z.string().min(3, "Domain name must be at least 3 characters"),
|
||||
name: z.string()
|
||||
.min(3, "Domain name must be at least 3 characters")
|
||||
.regex(domainRegex, "Please enter a valid domain name (e.g., example.com)"),
|
||||
providerId: z.string().uuid().optional(),
|
||||
isActive: z.boolean().default(true),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user