-
Notifications
You must be signed in to change notification settings - Fork 2
Uuid
Pieter Hordijk edited this page Jan 1, 2019
·
1 revision
Validates the input (string) to be a nil UUID.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\Uuid\Nil;
(new Nil())->validate('00000000-0000-0000-0000-000000000000');-
Type.Stringwhen the validated value is not a string -
Uuid.Nilwhen the validated value is not a nil UUID
Validates the input (string) to be a version 1 UUID.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\Uuid\Version1;
(new Version1())->validate('5ba4dff4-e99d-11e8-9f32-f2801f1b9fd1');-
Type.Stringwhen the validated value is not a string -
Uuid.Version1when the validated value is not a version 1 UUID
Validates the input (string) to be a version 2 UUID.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\Uuid\Version2;
(new Version2())->validate('5ba4dff4-e99d-21e8-9f32-f2801f1b9fd1');-
Type.Stringwhen the validated value is not a string -
Uuid.Version2when the validated value is not a version 2 UUID
Validates the input (string) to be a version 3 UUID.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\Uuid\Version3;
(new Version3())->validate('5ba4dff4-e99d-31e8-9f32-f2801f1b9fd1');-
Type.Stringwhen the validated value is not a string -
Uuid.Version3when the validated value is not a version 3 UUID
Validates the input (string) to be a version 4 UUID.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\Uuid\Version4;
(new Version4())->validate('d0e67d41-ab5d-4b49-8ed6-17e9bffc4621');-
Type.Stringwhen the validated value is not a string -
Uuid.Version4when the validated value is not a version 4 UUID
Validates the input (string) to be a version 5 UUID.
Available since: 1.0.0
<?php declare(strict_types);
use HarmonyIO\Validation\Rule\Uuid\Version5;
(new Version5())->validate('d0e67d41-ab5d-5b49-8ed6-17e9bffc4621');-
Type.Stringwhen the validated value is not a string -
Uuid.Version5when the validated value is not a version 5 UUID