macgyer / yii2-uuid-validator
UUID validator for Yii2
Installs: 11 551
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 2
Open Issues: 1
Type:yii2-extension
Requires
- php: >=5.4.0
- yiisoft/yii2: ~2.0
This package is auto-updated.
Last update: 2024-10-10 08:15:39 UTC
README
UUID validator for Yii2 framework
This validator was strongly influenced by https://github.com/ramsey/uuid. Thanks @ramsey for your great UUID package.
Installation
The preferred way of installation is through Composer. If you don't have Composer you can get it here: https://getcomposer.org/
To install the package add the following to the require
section of your composer.json:
"require": {
"macgyer/yii2-uuid-validator": "*"
},
Usage
Just add the validator to your Model class:
// rules
public function rules()
{
return [
// more rules
['some_property', \macgyer\yii2uuidvalidator\UuidValidator::className()],
];
}