mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-09 13:07:37 +08:00
Update error messages for clarity
This commit is contained in:
parent
3afd26cd69
commit
c24a4f4f7f
2 changed files with 4 additions and 2 deletions
|
@ -92,7 +92,7 @@ defmodule Livebook.Notebook.AppSettings do
|
||||||
:output_type
|
:output_type
|
||||||
])
|
])
|
||||||
|> validate_format(:slug, ~r/^[a-zA-Z0-9-]+$/,
|
|> validate_format(:slug, ~r/^[a-zA-Z0-9-]+$/,
|
||||||
message: "slug can only contain alphanumeric characters and dashes"
|
message: "should only contain alphanumeric characters and dashes"
|
||||||
)
|
)
|
||||||
|> cast_access_attrs(attrs)
|
|> cast_access_attrs(attrs)
|
||||||
|> cast_mode_specific_attrs(attrs)
|
|> cast_mode_specific_attrs(attrs)
|
||||||
|
|
|
@ -48,7 +48,9 @@ defmodule Livebook.Teams.Org do
|
||||||
org
|
org
|
||||||
|> cast(attrs, @fields)
|
|> cast(attrs, @fields)
|
||||||
|> validate_required(@required_fields)
|
|> validate_required(@required_fields)
|
||||||
|> validate_format(:name, ~r/^[a-z0-9][a-z0-9\-]*$/)
|
|> validate_format(:name, ~r/^[a-z0-9][a-z0-9\-]*$/,
|
||||||
|
message: "should only contain alphanumeric characters and dashes"
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
@doc """
|
@doc """
|
||||||
|
|
Loading…
Add table
Reference in a new issue