rodgermd/uniqueentitynotnull-bundle
Composer 安装命令:
composer require rodgermd/uniqueentitynotnull-bundle
包简介
Check if entity is unique if not null
README 文档
README
Validates the entity if properties are unique if it is not null
Install
composer.json:
"rodgermd/uniqueentitynotnull-bundle": "dev-master"
AppKernel.php:
new Rodgermd\UniqueNotNullEntityBundle\RodgermdUniqueNotNullEntityBundle(),
Usage
use Rodgermd\UniqueNotNullEntityBundle\Validator as UniqueConstraints; # include namespace shortcut
/**
* @ORM\Entity
* @UniqueConstraints\HasUniqueProperties; # defines the class has properties to check, required to start validation
*/
class Entity {
/**
* @UniqueConstraints\UniqueProperty(message="Not unique property") # property to be validated
*/
protected $property;
}
统计信息
- 总下载量: 22
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 4
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-12-02