Skip to content

Commit

Permalink
Accept hostname with '-' characters
Browse files Browse the repository at this point in the history
  • Loading branch information
icidel authored and plouc committed Nov 16, 2020
1 parent d4c7a9b commit 1da4985
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/servers/components/CreateServer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class CreateServer extends React.Component<ICreateServerProps> {
.required(),
url: Yup.string()
.matches(
/^https?:\/\/(((www\.)?[a-zA-Z0-9._]{2,}\.[a-z]{2,6})|localhost|([0-9]{1,3}\.){3}[0-9]{1,3})$/,
/^https?:\/\/(((www\.)?[a-zA-Z0-9._-]{2,}\.[a-z]{2,6})|localhost|([0-9]{1,3}\.){3}[0-9]{1,3})$/,
'Invalid URL'
)
.required(),
Expand Down Expand Up @@ -160,4 +160,4 @@ class CreateServer extends React.Component<ICreateServerProps> {
}
}

export default CreateServer
export default CreateServer

0 comments on commit 1da4985

Please sign in to comment.