Skip to content

Latest commit

 

History

History
71 lines (61 loc) · 1.38 KB

README.md

File metadata and controls

71 lines (61 loc) · 1.38 KB

Validation for Elixir (Under development)

  • Ability to nest rules for nested structs
  • Hooks before validation rules (normalizers?) (for example normalizes 2,55 to 2.55)

Integrations

  • plug -> for validating http requests
  • ecto -> to validate with database
  • gettext -> error messages internationalization

Rules (from Laravel)

  • Accepted
  • Active URL
  • After (Date)
  • Alpha
  • Alpha Dash
  • Alpha Numeric
  • Array
  • Before (Date)
  • Between
  • Boolean
  • Confirmed
  • Date
  • Date Format
  • Different
  • Digits
  • Digits Between
  • Distinct
  • E-Mail
  • Exists (Database)
  • Filled
  • Image (File)
  • In
  • In Array
  • Integer
  • IP Address
  • JSON
  • Max
  • MIME Types (File)
  • Min
  • Not In
  • Numeric
  • Present
  • Regular Expression
  • Required
  • Required If
  • Required Unless
  • Required With
  • Required With All
  • Required Without
  • Required Without All
  • Same
  • Size
  • String
  • Timezone
  • Unique (Database)
  • URL
  • Accepted

Higher order rules

  • if_field -> if other field exists, or it has specific value, validate with some other rule.
  • if_not_field -> reverse of if_field

Copyright and License

Copyright (c) 2016, Roberts Gulans.

Phoenix source code is licensed under the MIT License.