{"id":28936128,"url":"https://github.com/aalfiann/native-form-validation","last_synced_at":"2025-08-23T02:03:12.508Z","repository":{"id":57308279,"uuid":"217905025","full_name":"aalfiann/native-form-validation","owner":"aalfiann","description":"Native JavaScript Form Validation","archived":false,"fork":false,"pushed_at":"2025-02-19T20:23:52.000Z","size":859,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-07T15:05:46.631Z","etag":null,"topics":["form-validation","javascript-validation","simple-validation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/aalfiann.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-27T19:26:00.000Z","updated_at":"2024-10-31T05:04:44.000Z","dependencies_parsed_at":"2024-02-16T01:33:27.436Z","dependency_job_id":"7fe6d419-55a2-484c-af6f-09255641df7b","html_url":"https://github.com/aalfiann/native-form-validation","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalfiann%2Fnative-form-validation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalfiann%2Fnative-form-validation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalfiann%2Fnative-form-validation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalfiann%2Fnative-form-validation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aalfiann","download_url":"https://codeload.github.com/aalfiann/native-form-validation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aalfiann%2Fnative-form-validation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258976482,"owners_count":22787108,"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":["form-validation","javascript-validation","simple-validation"],"created_at":"2025-06-22T20:07:44.516Z","updated_at":"2025-08-23T02:03:12.472Z","avatar_url":"https://github.com/aalfiann.png","language":"JavaScript","readme":"# Native Form Validation\n[![NPM](https://nodei.co/npm/native-form-validation.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/native-form-validation/)\n\n[![npm version](https://img.shields.io/npm/v/native-form-validation.svg?style=flat-square)](https://www.npmjs.org/package/native-form-validation)\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/aalfiann/native-form-validation/tree/master.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/aalfiann/native-form-validation/tree/master)\n[![Known Vulnerabilities](https://snyk.io//test/github/aalfiann/native-form-validation/badge.svg?targetFile=package.json)](https://snyk.io//test/github/aalfiann/native-form-validation?targetFile=package.json)\n![License](https://img.shields.io/npm/l/native-form-validation)\n![NPM download/month](https://img.shields.io/npm/dm/native-form-validation.svg)\n![NPM download total](https://img.shields.io/npm/dt/native-form-validation.svg)\n[![](https://data.jsdelivr.com/v1/package/npm/native-form-validation/badge)](https://www.jsdelivr.com/package/npm/native-form-validation)\n\nNative JavaScript Form Validation for Browser / UI Framework.\n\n### Background\nThere is a lot of `Form Validation`, but most of them was created for `jQuery` and too bloated. This is an `native` javascript form validation which is can be use for all kind of javascript UI framework.\n\n### Install using NPM\n```bash\n$ npm install native-form-validation\n\n// load using require in nodejs\nconst FormValidation = require('native-form-validation');\n\n// or load using import in typescript\nimport FormValidation from 'native-form-validation';\n\n// or load use with path for client side\n\u003cscript src=\"node_modules/native-form-validation/dist/formvalidation.min.js\"\u003e\u003c/script\u003e\n```\n\n**Or simply use with CDN**\n```html\n\u003c!-- Always get the latest version --\u003e\n\u003c!-- Not recommended for production sites! --\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/native-form-validation/dist/formvalidation.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Get minor updates and patch fixes within a major version --\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/native-form-validation@1/dist/formvalidation.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Get patch fixes within a minor version --\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/native-form-validation@1.4/dist/formvalidation.min.js\"\u003e\u003c/script\u003e\n\n\u003c!-- Get a specific version --\u003e\n\u003c!-- Recommended for production sites! --\u003e\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/native-form-validation@1.4.0/dist/formvalidation.min.js\"\u003e\u003c/script\u003e\n```\n\n### Usage\n```javascript\nvar FV = new FormValidation();\n\n// Create the rules\nFV.rules({\n    username: {\n        required: true,\n        message: 'Username must be min 3-20 chars!',\n        minLength:3,\n        maxLength:20,\n        regex: /^[a-zA-Z0-9]/,\n        errorPlace:'username-error',\n        errorAddClass: {\n            username_group:'has-danger',\n            username:'is-invalid'\n        }\n    },\n    email: {\n        regex: /^(([^\u003c\u003e()[\\]\\\\.,;:\\s@\\\"]+(\\.[^\u003c\u003e()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n        errorPlace:'email-error',\n        errorAddClass: {\n            email_group:'has-danger',\n            email:'is-invalid'\n        }\n    }\n});\n\n// Validate all\nFV.validate();\n\n// Determine is Valid all\nif(FV.isValid()) {\n    // run your code\n}\n\n// Validate per element\nFV.element('username').validate();\n\n// Determine is Valid per element\nif(FV.element('username').isValid()) {\n    // run your code\n}\n```\n\n### Documentation\nPlease see our Wiki at [here](https://github.com/aalfiann/native-form-validation/wiki).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faalfiann%2Fnative-form-validation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faalfiann%2Fnative-form-validation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faalfiann%2Fnative-form-validation/lists"}