validators: Allow only lowercase characters for hostname
Validation error mentions only lowercase characters, this updates the regex accordingly.
This commit is contained in:
parent
3bd4dc89c4
commit
9b6934438a
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
)
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue