@@ -9,6 +9,21 @@ A complete library, with PSR standard and guarantee of all methods unit tested b
99- Validate Data in General
1010- Validate Upload Files
1111
12+ ## Table of Contents
13+
14+ - [ Installation] ( #installation )
15+ - [ Data Validation] ( #data-validation-example )
16+ - [ File Upload Validation] ( #validating-files-upload )
17+ - [ Validation Types] ( #validation-types-validators )
18+ - [ Custom Messages] ( #defining-custom-message )
19+ - [ Formatting] ( #formatting-examples )
20+ - [ Comparisons] ( #comparisons-examples )
21+ - [ Validations Methods] ( #validations-in-the-form-of-methods )
22+ - [ Generation Utilities] ( #generation-utilities )
23+ - [ Arrays Manipulation] ( #manipulate-arrays )
24+ - [ Utilities] ( #utilities )
25+ - [ CI/CD Coverage] ( #check-the-minimum-coverage-of-cicd-unit-tests-using-phpunit )
26+
1227## Installation
1328
1429Install using Composer:
@@ -20,7 +35,7 @@ composer require brunoconte3/dev-utils
2035Or add to your ` composer.json ` :
2136
2237``` json
23- "brunoconte3/dev-utils" : " 2.12 .0"
38+ "brunoconte3/dev-utils" : " 2.13 .0"
2439```
2540
2641## Data Validation Example
@@ -460,14 +475,55 @@ ValidateString::minWords('Bruno Conte', 2) //Return boolean
460475ValidateString::maxWords('Bruno Conte', 2) //Return boolean
461476```
462477
478+ ## Generation Utilities
479+
480+ ### UUID v7 - Generate and Validate
481+
482+ ``` php
483+ <?php
484+
485+ require 'vendor/autoload.php';
486+
487+ use DevUtils\Uuid;
488+
489+ // Generate UUID v7 (timestamp-based, sortable, unique)
490+ $uuid = Uuid::generate(); // ==> 01890f87-4f0b-7f6b-8b1d-9f4f9d7c3b5a
491+
492+ // Validate any UUID version (v1 to v8)
493+ Uuid::isValid('550e8400-e29b-41d4-a716-446655440000'); // ==> true
494+
495+ // Validate specific version
496+ Uuid::isValid('01890f87-4f0b-7f6b-8b1d-9f4f9d7c3b5a', 7); // ==> true
497+
498+ ```
499+
500+ ### Password Generation
501+
502+ ``` php
503+ <?php
504+
505+ use DevUtils\Utility;
506+
507+ /*
508+ Generate secure passwords
509+ int $size ==> Number of characters (Required)
510+ bool $uppercase ==> Include uppercase letters (default: true)
511+ bool $lowercase ==> Include lowercase letters (default: true)
512+ bool $numbers ==> Include numbers (default: true)
513+ bool $symbols ==> Include symbols (default: true)
514+ */
515+ Utility::generatePassword(10); // ==> aB3$xY9!zK
516+ Utility::generatePassword(16, true, true, true, false); // Without symbols
517+ ```
518+
463519## Manipulate Arrays
464520
465521``` php
466522<?php
467523
468524require 'vendor/autoload.php';
469525
470- use DevUtils\Array ;
526+ use DevUtils\Arrays ;
471527
472528$array = ['primeiro' => 15, 'segundo' => 25];
473529var_dump(Arrays::searchKey($array, 'primeiro')); // Search for key in array, and Return position ==> returns 0
@@ -533,16 +589,6 @@ use DevUtils\Utility;
533589
534590Utility::captureClientIp(); // Return user IP, capture per layer available, eg 201.200.25.40
535591
536- /*
537- Return an automatically generated password, there are 5 parameters, only the first one is mandatory
538- int $size ==> Number of characters in the password (Required)
539- bool $uppercase ==> If there will be capital letters
540- bool $lowercase ==> If there will be lowercase letters
541- bool $numbers ==> if there will be numbers
542- bool $symbols ==> if there will be symbols
543- */
544- Utility::generatePassword(10);
545-
546592/*
547593* @return string -> Full URL string
548594* @param string $host -> system domain
0 commit comments