diff --git a/lib/livebook/notebook.ex b/lib/livebook/notebook.ex index 8ee0c0cce..76d9b3524 100644 --- a/lib/livebook/notebook.ex +++ b/lib/livebook/notebook.ex @@ -953,7 +953,7 @@ defmodule Livebook.Notebook do @spec validate_file_entry_name(Ecto.Changeset.t(), atom()) :: Ecto.Changeset.t() def validate_file_entry_name(changeset, field) do changeset - |> Ecto.Changeset.validate_format(field, ~r/^[\w-.]+$/, + |> Ecto.Changeset.validate_format(field, ~r/^[\w\-\.]+$/, message: "should contain only alphanumeric characters, dash, underscore and dot" ) |> Ecto.Changeset.validate_format(field, ~r/\.\w+$/, message: "should end with an extension")