{"id":21569887,"url":"https://github.com/iterable/play-formnolia","last_synced_at":"2025-03-18T06:12:58.479Z","repository":{"id":57725418,"uuid":"123829486","full_name":"Iterable/play-formnolia","owner":"Iterable","description":null,"archived":false,"fork":false,"pushed_at":"2018-09-07T09:51:52.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":68,"default_branch":"master","last_synced_at":"2025-01-24T12:45:14.845Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Iterable.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":"2018-03-04T21:11:59.000Z","updated_at":"2018-09-28T15:07:21.000Z","dependencies_parsed_at":"2022-09-11T20:21:40.724Z","dependency_job_id":null,"html_url":"https://github.com/Iterable/play-formnolia","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iterable%2Fplay-formnolia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iterable%2Fplay-formnolia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iterable%2Fplay-formnolia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Iterable%2Fplay-formnolia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Iterable","download_url":"https://codeload.github.com/Iterable/play-formnolia/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244166760,"owners_count":20409179,"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":[],"created_at":"2024-11-24T11:10:58.210Z","updated_at":"2025-03-18T06:12:58.437Z","avatar_url":"https://github.com/Iterable.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# play-formnolia\n\n[![Travis CI](https://travis-ci.org/Iterable/play-formnolia.svg?branch=master)](https://travis-ci.org/Iterable/play-formnolia) [![Maven](https://img.shields.io/maven-central/v/com.iterable/play-formnolia_2.12.svg)](https://mvnrepository.com/artifact/com.iterable/play-formnolia_2.12)\n\nA project to automatically generate and validate Play forms using [Magnolia](https://magnolia.work/).\n\n## Example\n\n```scala\n// Add the required imports:\nimport com.iterable.formnolia.SafeForms._\nimport play.api.data.format.Formats._\n\n// Create a case class representing the form:\ncase class UserData(\n  username: String,\n  firstName: String,\n  lastName: String,\n  avatarUrl: Option[String]\n)\n\n// Generate the form and bind it in a Play action (or elsewhere).\nnewForm[UserData].bindFromRequest().fold(\n  { formWithErrors =\u003e\n    BadRequest(s\"Errors: ${formWithErrors.errors}\")\n  },\n  { userData =\u003e\n    Ok(s\"Got $userData\")\n  }\n)\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiterable%2Fplay-formnolia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiterable%2Fplay-formnolia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiterable%2Fplay-formnolia/lists"}