Elixir Validation

Build StatusBuild statusCoverage StatusInline docsHex Versionhex.pm downloadsHitCountLicense

Easy. Simple. Powerful. 💪

Elixir Validation library with +25 fully tested rules. (+30 coming up soon!)

⚠️⚠️ ️ Library under development! Roadmap: upcoming new rules. ⚠️⚠️

Demo

# alias Validation, as: V

# valid data will return true
V.email("hello@gmail.com")
V.uuid("e4eaaaf2-d142-11e1-b3e4-080027620cdd")
V.credit_card("4882743696073832")
V.mac_address("12-77-0E-42-E4-65")
V.consonants("bcdfgh")
V.country_code("US")


# invalid data will return false
V.language_code("qq") # could be something like "en", "pt" or "de"
V.vowel("bcdf")       # could be something like "aeiou"
V.yes("nope")         # could be something like "yes", "yeah", "yeap"
V.is_odd(2)           # could be something like 3 or 5... 

Install

To use Elixir Validation, please add to your mix.exs and run mix deps.get:

def deps do
  [
    {:validation, "~> 0.0.1-dev"}
  ]
end

Compatibility: Elixir 1.6+

Documentation

To more information, please access the full documention.

Rules

+25 fully tested rules such as:

Roadmap: +30 coming up soon!

Barcode, Iban, WordCount, Contains, Bic, CurrencySymbol, Isbn, Issn, Domain, Extension, Factor, Fibonacci, Finite, HexRgbColor, IdentityCard, Imei, Infinite, Ip, KeyNested, StartsWith, EndsWith, Length, Min, Max, NfeAccessKey, NoWhitespace, NotBlank, NotEmpty, Numeric, PerfectSquare, Pesel, Phone, PostalCode (us, uk, br...), PrimeNumber, Punct, Roman, Size, Slug, Space, Url, Version

Contribution

Check out the list of awesome contributors.

Inspiration

We highly appreciate ❤️ the Respect\Validation project. Elixir Validation was completely based upon this incredible project. Kudos for all contributors. We can't thank you enough.

License

MIT LicenseMatheus Gontijo