{"id":32164929,"url":"https://github.com/fourkio/validator","last_synced_at":"2025-10-21T14:56:12.640Z","repository":{"id":62430685,"uuid":"63354978","full_name":"fourkio/validator","owner":"fourkio","description":"A set of format validators for elixir","archived":false,"fork":false,"pushed_at":"2017-06-21T06:40:11.000Z","size":13,"stargazers_count":4,"open_issues_count":5,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-10-21T14:56:12.402Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fourkio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-14T17:10:22.000Z","updated_at":"2018-12-03T09:01:01.000Z","dependencies_parsed_at":"2022-11-01T20:20:54.818Z","dependency_job_id":null,"html_url":"https://github.com/fourkio/validator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fourkio/validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fourkio%2Fvalidator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fourkio%2Fvalidator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fourkio%2Fvalidator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fourkio%2Fvalidator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fourkio","download_url":"https://codeload.github.com/fourkio/validator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fourkio%2Fvalidator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280281397,"owners_count":26303709,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-21T14:56:11.227Z","updated_at":"2025-10-21T14:56:12.635Z","avatar_url":"https://github.com/fourkio.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# validator\n\n[![Build Status](https://semaphoreci.com/api/v1/fourkio/validator/branches/master/badge.svg)](https://semaphoreci.com/fourkio/validator)\n\nThis is aims to be an elixir clone of the [NPM Validator](https://github.com/chriso/validator.js) package.\n\nCurrently, only UUIDs, emails and URLs are supported.\n\n## Installation\n\nIf [available in Hex](https://hex.pm/docs/publish), the package can be installed as:\n\n  1. Add `validator` to your list of dependencies in `mix.exs`:\n\n    ```elixir\n    def deps do\n      [{:validator, \"~\u003e 0.2.0\"}]\n    end\n    ```\n\n  2. Run `mix deps.install`\n\n  3. Ensure `validator` is started before your application:\n\n    ```elixir\n    def application do\n      [applications: [:validator]]\n    end\n    ```\n\n## Usage\n```\n  def changeset(struct, params \\\\ %{}) do\n    struct\n    |\u003e cast(params, [:api_id, :some_url, :some_email])\n    |\u003e validate_required([:api_id, :some_url])\n    |\u003e Validator.validate_uuid(:api_id)\n    |\u003e Validator.validate_email(:some_email)\n    |\u003e Validator.validate_url(:some_url)\n  end\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffourkio%2Fvalidator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffourkio%2Fvalidator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffourkio%2Fvalidator/lists"}