feat: Telefonnummer im Kontaktformular ist Pflicht
Docker-Images bauen und veroeffentlichen / build-and-push (push) Successful in 2m50s
Docker-Images bauen und veroeffentlichen / build-and-push (push) Successful in 2m50s
Gleiche Prüfung wie bei der Buchung: mindestens 6 Zeichen, nur Ziffern, Leerzeichen und + ( ) / -. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
1 parent
20adfaa97e
commit
a47e91e9d5
3 files changed
+15
-5
No files matched your search
@@ -10,7 +10,7 @@ function request(overrides: Record<string, unknown> = {}) {
|
||||
return contactRequestSchema.parse({
|
||||
name: "Lena Beispiel",
|
||||
email: "[email protected]",
|
||||
phone: "",
|
||||
phone: "+49 170 1234567",
|
||||
availability: "abends",
|
||||
message: "Passt das Camp für Einsteigerinnen?",
|
||||
privacy: true,
|
||||
@@ -61,6 +61,10 @@ describe("Erstgespräch", () => {
|
||||
test("Pflichtangaben und Einwilligung werden serverseitig geprüft", () => {
|
||||
expect(contactRequestSchema.safeParse({ name: "L", email: "kein-mail", privacy: false }).success).toBe(false);
|
||||
expect(contactRequestSchema.safeParse({ name: "Lena", email: "[email protected]", privacy: false }).success).toBe(false);
|
||||
expect(request({ phone: " " }).phone).toBeNull();
|
||||
const base = { name: "Lena", email: "[email protected]", privacy: true };
|
||||
expect(contactRequestSchema.safeParse(base).success).toBe(false);
|
||||
expect(contactRequestSchema.safeParse({ ...base, phone: " " }).success).toBe(false);
|
||||
expect(contactRequestSchema.safeParse({ ...base, phone: "abc123456" }).success).toBe(false);
|
||||
expect(request({ phone: " +49 170 1234567 " }).phone).toBe("+49 170 1234567");
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user