This library contains common helpers used with Ecto.Changeset.
I noticed myself copying over validators from various projects multiple times. So I figured I’d create a common library. I know everyone likes to have their own validation logic but I tried keeping it as generic as possible so it’ll be useful for many situations.
For now, it contains validators for the following cases:
EmailValidator: validate emails and exclude temporary email providers
URLValidator: validate URLs with various levels of strictness
StringValidator: validate a string has a given prefix
PostalCodeValidator: validate postal codes for multiple countries (to be improved)
SocialSecurityValidator: validate social security number (SSN)
LuhnValidator: validate Luhn-type numbers such as credit card numbers and other administrative codes.
Happy to receive feedback, pull requests from motivated folks and ideas for improvement I hope this lib will grow into a set of good common ecto helpers and tools we can all benefit from.