Current section

22 Versions

Jump to

Compare versions

6 files changed
+15 additions
-3 deletions
  @@ -1,3 +1,10 @@
1 + # 0.1.2
2 +
3 + No breaking changes.
4 +
5 + - Adds `:uuid` type
6 + - Improves password regex to allow non-alphanumeric characters
7 +
1 8 # 0.1.1
2 9
3 10 No breaking changes.
  @@ -175,6 +175,7 @@ The field types and available validations are:
175 175
176 176 | Field type | Validations | Description |
177 177 | ---------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------- |
178 + | `:uuid` | `:equals` | string value |
178 179 | `:string` | `:equals` | string value |
179 180 | | `:is` | string length |
180 181 | | `:min` | minimum string length |
  @@ -19,4 +19,4 @@
19 19 {<<"optional">>,false},
20 20 {<<"repository">>,<<"hexpm">>},
21 21 {<<"requirement">>,<<"~> 3.7">>}]]}.
22 - {<<"version">>,<<"0.1.1">>}.
22 + {<<"version">>,<<"0.1.2">>}.
  @@ -182,6 +182,7 @@ defmodule Goal do
182 182
183 183 | Field type | Validations | Description |
184 184 | ---------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------- |
185 + | `:uuid` | `:equals` | string value |
185 186 | `:string` | `:equals` | string value |
186 187 | | `:is` | string length |
187 188 | | `:min` | minimum string length |
  @@ -294,6 +295,9 @@ defmodule Goal do
294 295
295 296 Map.put(acc, field, {:parameterized, Ecto.Enum, Ecto.Enum.init(values: values)})
296 297
298 + :uuid ->
299 + Map.put(acc, field, Ecto.UUID)
300 +
297 301 type ->
298 302 Map.put(acc, field, type)
299 303 end
  @@ -26,7 +26,7 @@ defmodule Goal.Regex do
26 26 @doc false
27 27 @spec password :: Regex.t()
28 28 def password do
29 - Application.get_env(:goal, :password_regex, ~r/^(?=.*[0-9])(?=.*[a-zA-Z])([a-zA-Z0-9]+)$/)
29 + Application.get_env(:goal, :password_regex, ~r/^(?=.*[a-zA-Z])(?=.*[0-9])/)
30 30 end
31 31
32 32 @doc false
Loading more files…