PHPackages                             phpbuildingblocks/types - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phpbuildingblocks/types

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

phpbuildingblocks/types
=======================

description

1.0.0(2y ago)03GPL-3.0-or-laterPHP

Since Jan 20Pushed 1y ago1 watchersCompare

[ Source](https://github.com/PHPBuildingBlocks/types)[ Packagist](https://packagist.org/packages/phpbuildingblocks/types)[ RSS](/packages/phpbuildingblocks-types/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

PHP Composite Types Collection
==============================

[](#php-composite-types-collection)

Description
-----------

[](#description)

This package is designed to provide a comprehensive collection of Value Objects, crafted for reusability and adaptability in various projects. Primarily, these types focus on implementing robust validation rules. However, they also offer the flexibility to override these validation rules as needed, ensuring a versatile and efficient utilization in a wide range of applications.

Getting Started
---------------

[](#getting-started)

### Dependencies

[](#dependencies)

Zero Dependencies

### Installing

[](#installing)

```
composer require phpbuildingblocks/types
```

### How to Rewrite validation rules

[](#how-to-rewrite-validation-rules)

Let's say you want to IntId to accept only positive numbers greater than 0. You can do this by extending the IntId class and overriding the validate method.

```
