{"id":21313749,"url":"https://github.com/iodevs/validatex","last_synced_at":"2025-10-31T20:02:17.437Z","repository":{"id":62430694,"uuid":"225596030","full_name":"iodevs/validatex","owner":"iodevs","description":"An Elixir validation library for live view forms. ","archived":false,"fork":false,"pushed_at":"2020-01-25T14:22:27.000Z","size":261,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-09-16T19:10:49.811Z","etag":null,"topics":["elixir","form-validation","hacktoberfest","liveview","phoenix-liveview","validation","validation-engine"],"latest_commit_sha":null,"homepage":"https://hexdocs.pm/validatex/","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iodevs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-12-03T10:46:26.000Z","updated_at":"2022-06-01T00:57:16.000Z","dependencies_parsed_at":"2022-11-01T20:19:12.285Z","dependency_job_id":null,"html_url":"https://github.com/iodevs/validatex","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iodevs%2Fvalidatex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iodevs%2Fvalidatex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iodevs%2Fvalidatex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iodevs%2Fvalidatex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iodevs","download_url":"https://codeload.github.com/iodevs/validatex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225778866,"owners_count":17522710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","form-validation","hacktoberfest","liveview","phoenix-liveview","validation","validation-engine"],"created_at":"2024-11-21T18:08:31.795Z","updated_at":"2025-10-31T20:02:17.310Z","avatar_url":"https://github.com/iodevs.png","language":"Elixir","readme":"# Validatex\n\n[![Build Status](https://semaphoreci.com/api/v1/s-m-i-t-a/validatex/branches/master/shields_badge.svg)](https://semaphoreci.com/s-m-i-t-a/validatex)\n\n\nThis library is useful for validating input forms (register / login / ...) to your web applications.\n\nFind inspiration in [validation example](https://github.com/iodevs/validatex_example) repository or [live demo](http://validatex.herokuapp.com/).\n\n\n## Installation\n\n```elixir\ndef deps do\n  [\n    {:validatex, \"~\u003e 1.0.1\"}\n  ]\nend\n```\n\n## Usage\n\nIf you want to use this library you have to define a few functions:\n1. [Initialize](https://github.com/iodevs/validatex_example/blob/master/lib/server_web/live/user/register_live.ex#L157) of form state\n2. Define [Validators](https://github.com/iodevs/validatex_example/blob/master/lib/server/validators.ex)\n3. Define [form](https://github.com/iodevs/validatex_example/blob/master/lib/server_web/templates/user/register.html.leex#L14) in template\n4. Define [handle_event](https://github.com/iodevs/validatex_example/blob/master/lib/server_web/live/user/register_live.ex#L110) for `on_blur` event\n5. Define [handle_event](https://github.com/iodevs/validatex_example/blob/master/lib/server_web/live/user/register_live.ex#L92) for `on_change` event\n6. In case of related two input forms (e.g. for password (P) and confirm password (CP)) is needed also define `handle_event` functions for `on_blur` ([P](https://github.com/iodevs/validatex_example/blob/master/lib/server_web/live/user/register_live.ex#L75)) and `on_change` ([P](https://github.com/iodevs/validatex_example/blob/master/lib/server_web/live/user/register_live.ex#L31), [CP](https://github.com/iodevs/validatex_example/blob/master/lib/server_web/live/user/register_live.ex#L75)) events.\n7. For form event `phx_submit` define [handle_event](https://github.com/iodevs/validatex_example/blob/master/lib/server_web/live/user/register_live.ex#L123) function where you'll call `Validation.validate_on_submit` function for each `field_name` of your input form and then `Validation.submit_if_valid`.\n\n\n## Notes\n\n* **Pros**\n  * per input form live validation\n  * possibility define own validation functions\n  * possible using at [Scenic](https://github.com/boydm/scenic)\n\n* **Cons**\n  * it isn't directly connected to Ecto\n\n* Comparison\n  * Using Validatex\n  ![](docs/register_user.gif)\n  * Using `changeset` from Ecto\n  ![](docs/using_with_ecto.gif)\n\n\n## License\n\nCode is licensed under the BSD-4-Clause.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiodevs%2Fvalidatex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiodevs%2Fvalidatex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiodevs%2Fvalidatex/lists"}