Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 0 additions & 36 deletions package-lock.json
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

package-lock nie powinien ulec żadnym zmianom w pr'ce gdzie nie instalujesz nic nowego itp. Możesz ręcznie skopiować stary package-lock (z przed twoich zmian) i go z powrotem zacommitować, albo lepiej - wyszukaj sobie jak się "edytuje" commity (interactive rebase) (efekt będzie ten sam, ale ta druga metoda bardziej porządna + można się czegoś zawsze nauczyć)

na przyszłość po prostu nie dodawaj package-lock.json do commitów

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/schemas/optional-url-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ export const OptionalUrlSchema = z
.string()
.trim()
.url(FORM_ERROR_MESSAGES.INVALID_URL)
.refine((data) => data === "" || data.startsWith("https://"), {
message: FORM_ERROR_MESSAGES.INVALID_URL,
})
.or(z.literal(""))
.nullish();
4 changes: 3 additions & 1 deletion src/schemas/required-url-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ import { RequiredStringSchema } from "./required-string-schema";

export const RequiredUrlSchema = RequiredStringSchema.url(
FORM_ERROR_MESSAGES.INVALID_URL,
);
).refine((data) => data.startsWith("https://"), {
message: FORM_ERROR_MESSAGES.INVALID_URL,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ten błąd niewiele mówi użytkownikowi, może dodaj nowy w stylu "Adres URL powinien zaczynać się od https://"

});
Loading