Skip to content

Commit

Permalink
validators: Allow only lowercase characters for hostname
Browse files Browse the repository at this point in the history
Validation error mentions only lowercase characters, this updates the regex accordingly.
  • Loading branch information
regexowl committed Dec 12, 2024
1 parent 9f20837 commit 1592f94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Components/CreateImageWizard/validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const isHostnameValid = (hostname: string) => {

return (
hostname.length < 65 &&
/^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$/.test(
/^(([a-z0-9]|[a-z0-9][a-z0-9-]*[a-z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9-]*[a-z0-9])$/.test(
hostname
)
);
Expand Down

0 comments on commit 1592f94

Please sign in to comment.