diff --git a/lib/comfycamp/accounts/user.ex b/lib/comfycamp/accounts/user.ex index 7ba3c80..b0279e7 100644 --- a/lib/comfycamp/accounts/user.ex +++ b/lib/comfycamp/accounts/user.ex @@ -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. diff --git a/lib/comfycamp_web/live/user_registration_live.ex b/lib/comfycamp_web/live/user_registration_live.ex index 384a186..5703c68 100644 --- a/lib/comfycamp_web/live/user_registration_live.ex +++ b/lib/comfycamp_web/live/user_registration_live.ex @@ -37,6 +37,7 @@ defmodule ComfycampWeb.UserRegistrationLive do field={@form[:info]} type="textarea" label="Почему вы хотите получить доступ?" + spellcheck="true" required />