{"id":20134218,"url":"https://github.com/lfbn/json-resume-validator","last_synced_at":"2026-03-27T02:18:12.833Z","repository":{"id":57014412,"uuid":"222559907","full_name":"lfbn/json-resume-validator","owner":"lfbn","description":"Validates if a resume in JSON Resume format is valid.","archived":false,"fork":false,"pushed_at":"2020-11-21T17:26:03.000Z","size":1437,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T17:14:48.035Z","etag":null,"topics":["json","jsonresume"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/lfbn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-11-18T22:48:34.000Z","updated_at":"2022-11-19T17:14:44.000Z","dependencies_parsed_at":"2022-08-22T10:11:03.511Z","dependency_job_id":null,"html_url":"https://github.com/lfbn/json-resume-validator","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfbn%2Fjson-resume-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfbn%2Fjson-resume-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfbn%2Fjson-resume-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lfbn%2Fjson-resume-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lfbn","download_url":"https://codeload.github.com/lfbn/json-resume-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074923,"owners_count":21043490,"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":["json","jsonresume"],"created_at":"2024-11-13T21:07:21.091Z","updated_at":"2026-03-27T02:18:07.803Z","avatar_url":"https://github.com/lfbn.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JSON Resume Validator\n\nThis is a package that validates if a Resume is in JSON Resume format. It also validates if any desired properties are not empty.\n\nThe validations that make are:\n\n- If complies with JSON Schema of JSON Resume.\n- It has certain fields filled in. This is configurable.\n- If the country code (basics.countryCode) is in ISO-3166-1 ALPHA-2 format. If this field is empty, is not validated.\n\n## Installing\n\n```\ncomposer require lfbn/json-resume-validator\n```\n\n## Usage\n\n### As a CLI\n\nJust clone the project, and run. Follow the instructions.\n\n```\n./bin/jr-validate\n```\n\n### In your project\n\nFirst, install it, using composer:\n\n```\ncomposer require lfbn/json-resume-validator\n```\n\nThen, create an instance, and call the isValid() method.\n\n```php\n$path = 'json_resume.json';\n\n$validator = Lfbn\\JsonResumeValidator\\JsonResumeValidator::load($path);\n\necho 'Is valid? '.$validator-\u003eisValid();\n```\n\nEncapsulate the isValid() method inside a try/catch. This method will return true if the file is valid or throws an exception if is not valid.\n\nThe name of the exception has the description of the error it has.\n\n#### Your mandatory fields\n\nYou can, optionally, define the mandatory fields you want.\n\nJust define them using dot notation.\n\n```php\n$config = [\n    'mandatory_fields' =\u003e [\n        'basics.name',\n        'basics.email',\n        'basics.phone',\n        'basics.summary'\n    ]\n];\n\n$path = 'json_resume.json';\n$resume = Lfbn\\JsonResumeValidator\\JsonResumeValidator::load($path, $config);\n\n// It returns true, or it throws an Exception, is it fails in any Validation.\n$resume-\u003eisValid();\n```\n\n## Tests\n\nThis package has tests that use several JSON files to test if the behavior is as expected.\n\nTo execute them, just run:\n\n```php\ncomposer tests\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfbn%2Fjson-resume-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flfbn%2Fjson-resume-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flfbn%2Fjson-resume-validator/lists"}