{"id":19861290,"url":"https://github.com/sirscriptalot/preform","last_synced_at":"2025-02-28T22:45:26.455Z","repository":{"id":56888687,"uuid":"100058423","full_name":"sirscriptalot/preform","owner":"sirscriptalot","description":"Validation for Rack params.","archived":false,"fork":false,"pushed_at":"2017-08-11T20:07:06.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T17:20:39.927Z","etag":null,"topics":["params","rack","validation"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sirscriptalot.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":"2017-08-11T18:03:43.000Z","updated_at":"2018-05-04T15:05:44.000Z","dependencies_parsed_at":"2022-08-20T16:00:23.817Z","dependency_job_id":null,"html_url":"https://github.com/sirscriptalot/preform","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirscriptalot%2Fpreform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirscriptalot%2Fpreform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirscriptalot%2Fpreform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirscriptalot%2Fpreform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sirscriptalot","download_url":"https://codeload.github.com/sirscriptalot/preform/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241263404,"owners_count":19936057,"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":["params","rack","validation"],"created_at":"2024-11-12T15:08:34.687Z","updated_at":"2025-02-28T22:45:26.430Z","avatar_url":"https://github.com/sirscriptalot.png","language":"Ruby","readme":"# Preform\n\nA small library for validating user input. It includes a mixin,\nValidatable, and two opinionated classes that include it: Form, and Field.\n\n## Usage\n\n### Installation\n\n`gem install preform`\n\n### API\n\n#### Validatable\n\n`validate`: Template command method that needs to be implemented. Runs to determine errors.\n\n`valid?`: Query to see if any errors exist.\n\n`errors`: Returns the errors hash.\n\n`merge_errors!`: Given another validatable, merges errors into self's errors.\n\n`assert`: Tests a value to see if an error should be added or not. Always returns a boolean so asserts can be nested.\n\n#### Form\n\n`after_initialize`: Override to perform custom initialization behavior.\n\n`params`: Raw params given to the form.\n\n`attributes`: Hook that allows you to transform params for use in your application. By default returns raw params.\n\n#### Field\n\n`after_initialize`: Override to perform custom initialization behavior.\n\n`key`: Reader for the form key, used when merging errors into a form.\n\n`value`: Raw value to validate.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirscriptalot%2Fpreform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsirscriptalot%2Fpreform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirscriptalot%2Fpreform/lists"}