macgyer/yii2-uuid-validator

UUID validator for Yii2

Installs: 11 321

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 2

Open Issues: 1

Type:yii2-extension

1.0.1 2018-01-29 12:28 UTC

This package is auto-updated.

Last update: 2024-04-10 07:18:16 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()],
  ];
}