refactor: adds schemales changeset and validation constant
This commit is contained in:
parent
14a8417fdf
commit
7da037d81d
6 changed files with 158 additions and 34 deletions
|
|
@ -290,7 +290,9 @@ defmodule Mv.Accounts.User do
|
|||
changeset2 =
|
||||
{%{}, %{email: :string}}
|
||||
|> Ecto.Changeset.cast(%{email: email_string}, [:email])
|
||||
|> EctoCommons.EmailValidator.validate_email(:email, checks: [:html_input, :pow])
|
||||
|> EctoCommons.EmailValidator.validate_email(:email,
|
||||
checks: Mv.Constants.email_validator_checks()
|
||||
)
|
||||
|
||||
if changeset2.valid? do
|
||||
:ok
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue