Fix upper limit of range A-Z (#1668)

Since the A-z range includes [, \, ], ^, _, and `, I assume this is a typo on the upper limit of the A-Z range.
This commit is contained in:
bytecode1024 2022-02-17 17:24:49 +01:00 committed by GitHub
parent 0ac26cb0fc
commit d947d761a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@ defmodule Plausible.Site do
site
|> cast(attrs, [:domain, :timezone])
|> validate_required([:domain, :timezone])
|> validate_format(:domain, ~r/^[a-zA-z0-9\-\.\/\:]*$/,
|> validate_format(:domain, ~r/^[a-zA-Z0-9\-\.\/\:]*$/,
message: "only letters, numbers, slashes and period allowed"
)
|> unique_constraint(:domain)