refactor: simplify changeset checks, enable spellcheck
This commit is contained in:
parent
7aa77b1604
commit
80743a50f7
2 changed files with 2 additions and 6 deletions
|
@ -42,7 +42,7 @@ defmodule Comfycamp.Accounts.User do
|
|||
|> cast(attrs, [:email, :password, :info])
|
||||
|> validate_email(opts)
|
||||
|> validate_password(opts)
|
||||
|> validate_info()
|
||||
|> validate_length(:info, min: 2, max: 4096)
|
||||
end
|
||||
|
||||
defp validate_email(changeset, opts) do
|
||||
|
@ -89,11 +89,6 @@ defmodule Comfycamp.Accounts.User do
|
|||
end
|
||||
end
|
||||
|
||||
defp validate_info(changeset) do
|
||||
changeset
|
||||
|> validate_length(:info, max: 4096)
|
||||
end
|
||||
|
||||
@doc """
|
||||
A user changeset for changing the email.
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ defmodule ComfycampWeb.UserRegistrationLive do
|
|||
field={@form[:info]}
|
||||
type="textarea"
|
||||
label="Почему вы хотите получить доступ?"
|
||||
spellcheck="true"
|
||||
required
|
||||
/>
|
||||
<p>
|
||||
|
|
Loading…
Reference in a new issue