PHPackages                             ravage84/cakephp-valid-foreign-key-behavior - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. ravage84/cakephp-valid-foreign-key-behavior

ActiveCakephp-plugin[Validation &amp; Sanitization](/categories/validation)

ravage84/cakephp-valid-foreign-key-behavior
===========================================

A CakePHP behavior to validate foreign keys

0.2.0(9y ago)1767[6 issues](https://github.com/ravage84/cakephp-valid-foreign-key-behavior/issues)MITPHPPHP &gt;=5.3.0

Since Nov 23Pushed 8y agoCompare

[ Source](https://github.com/ravage84/cakephp-valid-foreign-key-behavior)[ Packagist](https://packagist.org/packages/ravage84/cakephp-valid-foreign-key-behavior)[ Docs](https://github.com/ravage84/cakephp-valid-foreign-key-behavior)[ RSS](/packages/ravage84-cakephp-valid-foreign-key-behavior/feed)WikiDiscussions master Synced 1mo ago

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

CakePHP ValidForeignKey Behavior
================================

[](#cakephp-validforeignkey-behavior)

A CakePHP 2.x behavior plugin to validate foreign keys.

[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://raw.githubusercontent.com/ravage84/cakephp-valid-foreign-key-behavior/master/LICENSE.txt)[![Build Status](https://camo.githubusercontent.com/002edabf189f711e6d5e0529525c267313e80b6e8db01517c5888ab756dfac9e/68747470733a2f2f7472617669732d63692e6f72672f72617661676538342f63616b657068702d76616c69642d666f726569676e2d6b65792d6265686176696f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/ravage84/cakephp-valid-foreign-key-behavior)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/56d5f80e4429be80b1d1edbd5e87f541d051638de6f3ced2ffe0b17603f92e21/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f72617661676538342f63616b657068702d76616c69642d666f726569676e2d6b65792d6265686176696f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/ravage84/cakephp-valid-foreign-key-behavior/)[![Latest Stable Version](https://camo.githubusercontent.com/d39dd04c442715e76a3e0600624617dca566abeca35435b4ead9edde47b4b532/68747470733a2f2f706f7365722e707567782e6f72672f72617661676538342f63616b657068702d76616c69642d666f726569676e2d6b65792d6265686176696f722f762f737461626c65)](https://packagist.org/packages/ravage84/cakephp-valid-foreign-key-behavior)[![Latest Unstable Version](https://camo.githubusercontent.com/b45383ba5d44fcdc642b8516d11f1b9855ee924b3fe59868507e9cdbd5dcaf02/68747470733a2f2f706f7365722e707567782e6f72672f72617661676538342f63616b657068702d76616c69642d666f726569676e2d6b65792d6265686176696f722f762f756e737461626c65)](https://packagist.org/packages/ravage84/cakephp-valid-foreign-key-behavior)[![Total Downloads](https://camo.githubusercontent.com/9a404c91aa5a030a800545aefa9fd8025b8ffa6f608ec6092b7b4e69a86aedd1/68747470733a2f2f706f7365722e707567782e6f72672f72617661676538342f63616b657068702d76616c69642d666f726569676e2d6b65792d6265686176696f722f642f746f74616c2e706e67)](https://packagist.org/packages/ravage84/cakephp-fake-seeder)[![composer.lock](https://camo.githubusercontent.com/03cce1160a7aa14e80e15de35d85cf620917193404047c0f218082a2d17d9f60/68747470733a2f2f706f7365722e707567782e6f72672f72617661676538342f63616b657068702d76616c69642d666f726569676e2d6b65792d6265686176696f722f636f6d706f7365726c6f636b)](https://packagist.org/packages/ravage84/cakephp-valid-foreign-key-behavior)[![GitHub issues](https://camo.githubusercontent.com/ea2e60a12507dab7934a32776f7c53b7b917fb318ea36074def28dfbc4b16b14/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f72617661676538342f63616b657068702d76616c69642d666f726569676e2d6b65792d6265686176696f722e737667)](https://github.com/ravage84/cakephp-valid-foreign-key-behavior/issues)[![GitHub forks](https://camo.githubusercontent.com/e6173dde13d1d3740eedaa51d3a6b13ca3b6bc2769395748bf00b259e66174fb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f72617661676538342f63616b657068702d76616c69642d666f726569676e2d6b65792d6265686176696f722e737667)](https://github.com/ravage84/cakephp-valid-foreign-key-behavior/network)[![GitHub stars](https://camo.githubusercontent.com/a15246d56726ef6eed56a646bbd613beb45274fbcab99bd89a26bd4c17f34d36/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f72617661676538342f63616b657068702d76616c69642d666f726569676e2d6b65792d6265686176696f722e737667)](https://github.com/ravage84/cakephp-valid-foreign-key-behavior/stargazers)

Why should I use it?
--------------------

[](#why-should-i-use-it)

TODO

Installation
------------

[](#installation)

### Requirements

[](#requirements)

- PHP &gt;= 5.4
- CakePHP 2.x (tested with TODO)

### Installation via composer

[](#installation-via-composer)

```
composer require ravage84/cakephp-valid-foreign-key-behavior

```

### Installation alternatives

[](#installation-alternatives)

Refer to the CakePHP CookBook section [How To Install Plugins](http://book.cakephp.org/2.0/en/plugins/how-to-install-plugins.html).

CakePHP Version Support
-----------------------

[](#cakephp-version-support)

This plugin only supports CakePHP 2.x.

Versioning
----------

[](#versioning)

The releases of this plugin are versioned using [SemVer](http://semver.org/).

Configuration
-------------

[](#configuration)

TODO

How to use
----------

[](#how-to-use)

TODO

Contributing
------------

[](#contributing)

See [CONTRIBUTING.md](CONTRIBUTING.md)

Security
--------

[](#security)

If you discover any security related issues, **please email** @ravage84 **instead** of using the issue tracker.

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md)

TODOs
-----

[](#todos)

- Add unit tests
- Add documentation

License
-------

[](#license)

This plugin is licensed under the [MIT License](LICENSE).

Attribution
-----------

[](#attribution)

This project was inspired by the works of others, such as:

TODO

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 94% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

3453d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b319e683a7001c095bcf138d870d7b7ed12a1040e11c0264b914c2e213922169?d=identicon)[ravage84](/maintainers/ravage84)

---

Top Contributors

[![ravage84](https://avatars.githubusercontent.com/u/625761?v=4)](https://github.com/ravage84 "ravage84 (63 commits)")[![TekkCraft](https://avatars.githubusercontent.com/u/21214298?v=4)](https://github.com/TekkCraft "TekkCraft (3 commits)")[![D4rkMindz](https://avatars.githubusercontent.com/u/16854141?v=4)](https://github.com/D4rkMindz "D4rkMindz (1 commits)")

---

Tags

behaviorcakephpcakephp-pluginforeign-keyspluginpluginvalidationdatacakephpkeyBehaviorvaliddata validationforeign

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ravage84-cakephp-valid-foreign-key-behavior/health.svg)

```
[![Health](https://phpackages.com/badges/ravage84-cakephp-valid-foreign-key-behavior/health.svg)](https://phpackages.com/packages/ravage84-cakephp-valid-foreign-key-behavior)
```

###  Alternatives

[vlucas/valitron

Simple, elegant, stand-alone validation library with NO dependencies

1.6k4.4M128](/packages/vlucas-valitron)[ichikaway/cakeplus

Cake plus is cakephp plugin and provides some functions for CakePHP.

52101.1k1](/packages/ichikaway-cakeplus)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
