Download the PHP package lfbn/json-resume-validator without Composer
On this page you can find all versions of the php package lfbn/json-resume-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lfbn/json-resume-validator
More information about lfbn/json-resume-validator
Files in lfbn/json-resume-validator
Package json-resume-validator
Short Description Validate your JSON Resume
License MIT
Informations about the package json-resume-validator
JSON Resume Validator
This is a package that validates if a Resume is in JSON Resume format. It also validates if any desired properties are not empty.
The validations that make are:
- If complies with JSON Schema of JSON Resume.
- It has certain fields filled in. This is configurable.
- If the country code (basics.countryCode) is in ISO-3166-1 ALPHA-2 format. If this field is empty, is not validated.
Installing
Usage
As a CLI
Just clone the project, and run. Follow the instructions.
In your project
First, install it, using composer:
Then, create an instance, and call the isValid() method.
Encapsulate 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.
The name of the exception has the description of the error it has.
Your mandatory fields
You can, optionally, define the mandatory fields you want.
Just define them using dot notation.
Tests
This package has tests that use several JSON files to test if the behavior is as expected.
To execute them, just run:
All versions of json-resume-validator with dependencies
ext-json Version *
justinrainbow/json-schema Version ^5.2
adbario/php-dot-notation Version ^2.2
league/iso3166 Version ^3.0@dev
league/climate Version dev-master