-
Notifications
You must be signed in to change notification settings - Fork 0
fix: validation of url fields #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,5 +6,8 @@ export const OptionalUrlSchema = z | |
| .string() | ||
| .trim() | ||
| .url(FORM_ERROR_MESSAGES.INVALID_URL) | ||
| .startsWith("http://", { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https zamiast http |
||
| message: FORM_ERROR_MESSAGES.INVALID_URL, | ||
| }) | ||
| .or(z.literal("")) | ||
| .nullish(); | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,4 +4,6 @@ import { RequiredStringSchema } from "./required-string-schema"; | |
|
|
||
| export const RequiredUrlSchema = RequiredStringSchema.url( | ||
| FORM_ERROR_MESSAGES.INVALID_URL, | ||
| ); | ||
| ).startsWith("http://", { | ||
| message: FORM_ERROR_MESSAGES.INVALID_URL, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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://" |
||
| }); | ||
There was a problem hiding this comment.
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.jsondo commitów