Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update version and document #4

Merged
merged 3 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ valdi-*.tar
/tmp/

.DS_Store

mix.lock
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Some helpers function to do validate data
- validate string format/pattern
- validate custom function
- validate required(not nil) or not
- validate decimal (thanks @madclaws)

## Usage

Expand Down Expand Up @@ -150,6 +151,14 @@ iex(21)> Valdi.validate(12, number: [equal_to: 10])
iex(22)>
```

**Validate decimal**
Similar to validate number

```elixir
iex(19)> Valdi.validate(Decimal.new("10.0"), decimal: [greater_than: Decimal.new("0.0"), less_than: Decimal.new("20.0")])
:ok
```

**Validate string and enumerable length**

Valdi supported check length for `map`, `list`, `binary`, `tuple`
Expand Down
8 changes: 4 additions & 4 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Valdi.MixProject do
def project do
[
app: :valdi,
version: "0.3.0",
version: "0.4.0",
elixir: "~> 1.10",
start_permanent: Mix.env() == :prod,
deps: deps(),
Expand Down Expand Up @@ -54,9 +54,9 @@ defmodule Valdi.MixProject do
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:ex_doc, "~> 0.24", only: :dev, runtime: false},
{:excoveralls, "~> 0.14", only: :test},
{:decimal, "~> 2.0"}
{:ex_doc, "~> 0.30", only: :dev, runtime: false},
{:excoveralls, "~> 0.18", only: :test},
{:decimal, "~> 2.1"}
]
end
end
19 changes: 0 additions & 19 deletions mix.lock

This file was deleted.

Loading