Skip to content

Commit

Permalink
chore: update test and generated i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
heywhy committed Jan 24, 2025
1 parent 3162577 commit e3320c8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
24 changes: 12 additions & 12 deletions priv/gettext/default.pot
Original file line number Diff line number Diff line change
Expand Up @@ -11,62 +11,62 @@
msgid ""
msgstr ""

#: lib/validator/rules.ex:55
#: lib/validator/rules.ex:54
#, elixir-autogen, elixir-format
msgid "The %{attribute} field is required."
msgstr ""

#: lib/validator/rules.ex:124
#: lib/validator/rules.ex:116
#, elixir-autogen, elixir-format
msgid "The %{attribute} field is required when %{other} is %{value}."
msgstr ""

#: lib/validator/rules.ex:159
#: lib/validator/rules.ex:151
#, elixir-autogen, elixir-format
msgid "The %{attribute} field must be a string."
msgstr ""

#: lib/validator/rules.ex:186
#: lib/validator/rules.ex:178
#, elixir-autogen, elixir-format
msgid "The %{attribute} field must only contain letters."
msgstr ""

#: lib/validator/rules.ex:219
#: lib/validator/rules.ex:211
#, elixir-autogen, elixir-format
msgid "The %{attribute} field must only contain letters and numbers."
msgstr ""

#: lib/validator/rules.ex:254
#: lib/validator/rules.ex:246
#, elixir-autogen, elixir-format
msgid "The %{attribute} field must only contain letters, numbers, dashes, and underscores."
msgstr ""

#: lib/validator/rules.ex:289
#: lib/validator/rules.ex:281
#, elixir-autogen, elixir-format
msgid "The %{attribute} field must be an integer."
msgstr ""

#: lib/validator/rules.ex:321
#: lib/validator/rules.ex:313
#, elixir-autogen, elixir-format
msgid "The %{attribute} field must be a decimal."
msgstr ""

#: lib/validator/rules.ex:350
#: lib/validator/rules.ex:342
#, elixir-autogen, elixir-format
msgid "The %{attribute} field must be a number."
msgstr ""

#: lib/validator/rules.ex:390
#: lib/validator/rules.ex:382
#, elixir-autogen, elixir-format
msgid "The %{attribute} field must be a valid email address."
msgstr ""

#: lib/validator/rules.ex:429
#: lib/validator/rules.ex:419
#, elixir-autogen, elixir-format
msgid "The %{attribute} field confirmation does not match."
msgstr ""

#: lib/validator/rules.ex:457
#: lib/validator/rules.ex:444
#, elixir-autogen, elixir-format
msgid "The selected %{attribute} is invalid."
msgstr ""
5 changes: 3 additions & 2 deletions test/request_validator_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ defmodule RequestValidatorTest do
test "fails map validation" do
params = %{
address: %{
country: "US"
country: "NG"
},
documents: [
"hello",
Expand All @@ -50,7 +50,8 @@ defmodule RequestValidatorTest do
assert conn.status == 422
assert conn.resp_body =~ "field is required"
assert conn.resp_body =~ "address.line1"
refute conn.resp_body =~ "address.country"
assert conn.resp_body =~ "The address.state field is required when address.country is NG."
refute conn.resp_body =~ "The address.country field is required."
assert conn.resp_body =~ "The documents.0.name field is required."
assert conn.resp_body =~ "The documents.1.tags.0 field must be a string."
refute conn.resp_body =~ "The documents.2.tags.0 field must be a string."
Expand Down

0 comments on commit e3320c8

Please sign in to comment.