Download the PHP package webdevcave/schema-validator without Composer
On this page you can find all versions of the php package webdevcave/schema-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webdevcave/schema-validator
More information about webdevcave/schema-validator
Files in webdevcave/schema-validator
Package schema-validator
Short Description Schema validation, 'Zod' like validation
License MIT
Informations about the package schema-validator
Schema Validator
A simple schema validation library for PHP. This package allows you to define rules for your data and validate it easily.
Table of Contents
- Installation
- Usage
- Basic Usage
- Dataset Schema Example
- Contributing
- License
Installation
To install the Schema Validator PHP library, you can use Composer. Run the following command:
Usage
Basic Usage
Dataset Validation Example
The library also allows you to define more complex validation rules for nested structures or arrays. For example:
For objects, just use Validator::object() in a similar way.
Validation Error Handling
If the data is invalid, you can get more detailed error information:
This will output something like:
Contributing
We welcome contributions to this project! If you'd like to help improve the Schema Validator PHP library, please follow these steps:
How to Contribute
- Fork this repository to your GitHub account.
- Create a new branch for your feature or fix.
- Make your changes and test them thoroughly.
- Submit a pull request with a description of your changes and why they're needed.
Code Style
Please follow the PSR-12 coding standards for PHP when making contributions.
Issues
If you encounter any bugs or have suggestions for improvements, please open an issue in the GitHub repository.
License
This project is licensed under the MIT License - see the LICENSE file for details.