{"id":49848555,"url":"https://github.com/wjj0508403034/form-data","last_synced_at":"2026-05-14T13:41:19.623Z","repository":{"id":57269658,"uuid":"98542699","full_name":"wjj0508403034/form-data","owner":"wjj0508403034","description":null,"archived":false,"fork":false,"pushed_at":"2017-07-27T15:29:42.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-05-05T09:38:17.344Z","etag":null,"topics":["angularjs","from","mvvm","validator"],"latest_commit_sha":null,"homepage":null,"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/wjj0508403034.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}},"created_at":"2017-07-27T14:02:29.000Z","updated_at":"2017-08-04T14:19:10.000Z","dependencies_parsed_at":"2022-09-02T12:30:58.968Z","dependency_job_id":null,"html_url":"https://github.com/wjj0508403034/form-data","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wjj0508403034/form-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wjj0508403034%2Fform-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wjj0508403034%2Fform-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wjj0508403034%2Fform-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wjj0508403034%2Fform-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wjj0508403034","download_url":"https://codeload.github.com/wjj0508403034/form-data/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wjj0508403034%2Fform-data/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33027689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"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":["angularjs","from","mvvm","validator"],"created_at":"2026-05-14T13:41:18.965Z","updated_at":"2026-05-14T13:41:19.587Z","avatar_url":"https://github.com/wjj0508403034.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# huoyun-formdata\nform data validator in angular project\n\n# Installation\nInstall package with NPM and add it to your development dependencies:\n\n```\nnpm install --save-dev huoyun-formdata\n```\n\nUsage\n\n```\nangular.module('huoyun.project', ['huoyun.formdata']);\n\nangular.module('huoyun.project').controller(\"LoginController\", [\"$scope\", \"FormData\", \"UserService\", \"Validators\",\n  function($scope, FormData, UserService, Validators) {\n\n    $scope.vm = new FormData(\"email\", \"password\");\n    $scope.vm.addValidator(\"email\", Validators.Mandatory, \"邮箱不能为空。\");\n    $scope.vm.addValidator(\"email\", Validators.Email, \"邮件格式不正确。\");\n    $scope.vm.addValidator(\"password\", Validators.Mandatory, \"密码不能为空。\");\n\n    $scope.login = function() {\n      $scope.vm.onValid()\n        .then(login)\n        .catch(function(ex) {\n          $scope.vm.clearErrors();\n          $scope.vm.setError(ex.fieldName, ex.errorMessage);\n        });\n    };\n\n    function login() {\n      var model = $scope.vm.getModel();\n      UserService.login(model.email, model.password)\n        .then(function() {\n          window.location.href = \"/index.html\";\n        }).catch(function(err) {\n          $scope.vm.clearErrors();\n          $scope.vm.setError(\"email\", err.message);\n        });\n    }\n  }\n]);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwjj0508403034%2Fform-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwjj0508403034%2Fform-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwjj0508403034%2Fform-data/lists"}