{"id":15801683,"url":"https://github.com/jnv/demo-lightweight-forms-validation-react","last_synced_at":"2026-04-28T08:33:01.530Z","repository":{"id":140335691,"uuid":"523771739","full_name":"jnv/demo-lightweight-forms-validation-react","owner":"jnv","description":"Constraint validation API in React – complementary code for the article","archived":false,"fork":false,"pushed_at":"2022-08-23T20:59:55.000Z","size":275,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-06T01:41:00.995Z","etag":null,"topics":["constraint-validation-api","form","react"],"latest_commit_sha":null,"homepage":"https://www.jnv.zone/react-forms/","language":"JavaScript","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/jnv.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-11T15:18:46.000Z","updated_at":"2022-08-23T21:01:58.000Z","dependencies_parsed_at":"2023-04-04T15:32:46.001Z","dependency_job_id":null,"html_url":"https://github.com/jnv/demo-lightweight-forms-validation-react","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/jnv%2Fdemo-lightweight-forms-validation-react","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnv%2Fdemo-lightweight-forms-validation-react/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnv%2Fdemo-lightweight-forms-validation-react/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jnv%2Fdemo-lightweight-forms-validation-react/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jnv","download_url":"https://codeload.github.com/jnv/demo-lightweight-forms-validation-react/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246547388,"owners_count":20794970,"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":["constraint-validation-api","form","react"],"created_at":"2024-10-05T01:40:24.343Z","updated_at":"2026-04-28T08:33:01.486Z","avatar_url":"https://github.com/jnv.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lightweight Forms Validation in React\n\nComplementary repository with code examples for the article [Lightweight Forms Validation in React](https://www.jnv.zone/react-forms/).\n\nThis code demonstrates use of Constraints validation API (supported by all modern browsers) in React.\n\nTry it on [CodeSandbox](https://codesandbox.io/s/github/jnv/demo-lightweight-forms-validation-react).\n\n## Contents\n\nIndividual examples are in `ex-*` files under `src/` directory. Examples are mapped to the server path, so to visit `ex-02.js` visit `/ex-02` on the running server (i.e. `http://localhost:3000/ex-02`).\n\n- [ex-01](src/ex-01.js) – Basic form with the default browser validation pop-up message.\n- [ex-02](src/ex-02.js) – Capture the validation message and display it next to the field.\n- [ex-03](src/ex-03.js) – Suppress the browser's validation pop-up.\n- [ex-04](src/ex-04.js) – Add `onChange` handler to hide the displayed validation message when field is fixed.\n- [ex-05](src/ex-05.js) – Add custom validation pattern with explanation to demonstrate mixed locale (Firefox only).\n\n## Local setup\n\n1. Run `npm i`\n1. Start development server with `npm start`\n1. Visit `http://localhost:3000`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnv%2Fdemo-lightweight-forms-validation-react","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjnv%2Fdemo-lightweight-forms-validation-react","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjnv%2Fdemo-lightweight-forms-validation-react/lists"}