PHP Classes

VM PHP Validator Package: Validate objects using rules defined in comments

Recommend this page to a friend!
  Info   View files View files (129)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2022-05-27 (1 month ago) RSS 2.0 feedNot yet rated by the usersTotal: 67 This week: 4All time: 10,032 This week: 35Up
Version License PHP version Categories
vmvalidator 2.4.1MIT/X Consortium ...8Validation, Language, PHP 8
Description Author

This package can validate objects using rules defined in comments.

It can use PHP reflection support to extract validation rules defined by the class comments.

The package provides classes that implement several types of validation rules.

The package can validate the parameters passed to the class functions, return values, class variables, and class constants.

Suppose one of the validated values does not satisfy the validation rules. In that case, the package triggers an exception that applications can handle to process the claims when the class validated by this package uses invalid values.

Innovation Award
PHP Programming Innovation award nominee
May 2022
Nominee
Vote
Validation of data retrieved from external sources like the user input is mandatory in any robust PHP application.

There are many approaches to validating external data.

This package provides an alternative that simplifies the validation process of data passed to classes of objects or returned by those objects.

It uses PHP reflection to minimize the amount of PHP code necessary to validate data passed to classes of objects.

This way, developers reduce the effort to implement robust validation in their PHP applications.

Manuel Lemos
Picture of Ivan Grigorov
  Performance   Level  
Name: Ivan Grigorov <contact>
Classes: 1 package by
Country: Bulgaria Bulgaria
Innovation award
Innovation award
Nominee: 1x

  Files folder image Files  
File Role Description
Files folder imagedocs (2 files)
Files folder imageRMValidator (6 directories)
Files folder imagetests (3 files, 4 directories)
Accessible without login Plain text file .gitignore Data Auxiliary data
Accessible without login Plain text file codeception.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Plain text file index.php Class Class source
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Plain text file README.md Class Read me
Accessible without login Plain text file _config.yml Data Auxiliary data

  Files folder image Files  /  docs  
File Role Description
  Accessible without login Plain text file index.md Data Auxiliary data
  Accessible without login Plain text file _config.yml Data Auxiliary data

  Files folder image Files  /  RMValidator  
File Role Description
Files folder imageAttributes (2 directories)
Files folder imageCallables (1 file)
Files folder imageEnums (2 files)
Files folder imageExceptions (39 files, 1 directory)
Files folder imageOptions (1 file)
Files folder imageValidators (1 file)

  Files folder image Files  /  RMValidator  /  Attributes  
File Role Description
Files folder imageBase (3 files)
Files folder imagePropertyAttributes (8 directories)

  Files folder image Files  /  RMValidator  /  Attributes  /  Base  
File Role Description
  Plain text file BaseAttribute.php Class Class source
  Plain text file IAttribute.php Class Class source
  Plain text file IProfileAttribute.php Class Class source

  Files folder image Files  /  RMValidator  /  Attributes  /  PropertyAttributes  
File Role Description
Files folder imageCollection (7 files)
Files folder imageDateTime (3 files)
Files folder imageFile (2 files)
Files folder imageGlobal (5 files)
Files folder imageNumbers (3 files)
Files folder imageObject (2 files)
Files folder imageProfile (2 files)
Files folder imageStrings (4 files)

  Files folder image Files  /  RMValidator  /  Attributes  /  PropertyAttributes  /  Collection  
File Role Description
  Plain text file AllAttribute.php Class Class source
  Plain text file AnyAttribute.php Class Class source
  Plain text file CollectionAttribute.php Class Class source
  Plain text file CollectionTypeAttribute.php Class Class source
  Plain text file CountCollectionAttribute.php Class Class source
  Plain text file NestedCollectionAttribute.php Class Class source
  Plain text file UniqueAttribute.php Class Class source

  Files folder image Files  /  RMValidator  /  Attributes  /  PropertyAttributes  /  DateTime  
File Role Description
  Plain text file DateTimeAfterAttribute.php Class Class source
  Plain text file DateTimeBeforeAttribute.php Class Class source
  Plain text file DateTimeEqualsAttribute.php Class Class source

  Files folder image Files  /  RMValidator  /  Attributes  /  PropertyAttributes  /  File  
File Role Description
  Plain text file FileExtensionAttribute.php Class Class source
  Plain text file FileSizeAttribute.php Class Class source

  Files folder image Files  /  RMValidator  /  Attributes  /  PropertyAttributes  /  Global  
File Role Description
  Plain text file CustomAttribute.php Class Class source
  Plain text file EqualAttribute.php Class Class source
  Plain text file InBetweenAttribute.php Class Class source
  Plain text file RequiredAttribute.php Class Class source
  Plain text file SameAttribute.php Class Class source

  Files folder image Files  /  RMValidator  /  Attributes  /  PropertyAttributes  /  Numbers  
File Role Description
  Plain text file BiggerAttribute.php Class Class source
  Plain text file LowerAttribute.php Class Class source
  Plain text file RangeAttribute.php Class Class source

  Files folder image Files  /  RMValidator  /  Attributes  /  PropertyAttributes  /  Object  
File Role Description
  Plain text file HasPropertyAttribute.php Class Class source
  Plain text file NestedAttribute.php Class Class source

  Files folder image Files  /  RMValidator  /  Attributes  /  PropertyAttributes  /  Profile  
File Role Description
  Plain text file MemoryProfileAttribute.php Class Class source
  Plain text file TimeProfileAttribute.php Class Class source

  Files folder image Files  /  RMValidator  /  Attributes  /  PropertyAttributes  /  Strings  
File Role Description
  Plain text file RegexAttribute.php Class Class source
  Plain text file StringContainsAttribute.php Class Class source
  Plain text file StringLengthAttribute.php Class Class source
  Plain text file StringNotContainsAttribute.php Class Class source

  Files folder image Files  /  RMValidator  /  Callables  
File Role Description
  Plain text file CallableConfig.php Class Callable Types created

  Files folder image Files  /  RMValidator  /  Enums  
File Role Description
  Plain text file SeverityEnum.php Class Class source
  Plain text file ValidationOrderEnum.php Class Class source

  Files folder image Files  /  RMValidator  /  Exceptions  
File Role Description
Files folder imageBase (1 file)
  Plain text file AllException.php Class Class source
  Plain text file AnyException.php Class Class source
  Plain text file BiggerException.php Class Class source
  Plain text file CollectionException.php Class Class source
  Plain text file CollectionTypeException.php Class Class source
  Plain text file CountCollectionException.php Class Class source
  Plain text file CustomPropertyException.php Class Class source
  Plain text file DateTimeAfterException.php Class Class source
  Plain text file DateTimeBeforeException.php Class Class source
  Plain text file DateTimeEqualsException.php Class Class source
  Plain text file EmptyCollectionException.php Class Class source
  Plain text file EqualException.php Class Class source
  Plain text file FileExtensionException.php Class Class source
  Plain text file FileSizeException.php Class Class source
  Plain text file HasPropertyException.php Class Class source
  Plain text file InBetweenException.php Class Class source
  Plain text file InputTypeException.php Class Class source
  Plain text file LowerException.php Class Class source
  Plain text file MemoryConusumingException.php Class Class source
  Plain text file MethodDoesNotExistException.php Class Class source
  Plain text file NotADateTimeException.php Class Class source
  Plain text file NotAFileException.php Class Class source
  Plain text file NotAnObjectException.php Class Class source
  Plain text file NotANumberException.php Class Class source
  Plain text file NotCallableException.php Class Class source
  Plain text file NotNullableException.php Class Class source
  Plain text file ObjectException.php Class Class source
  Plain text file OrException.php Class Class source
  Plain text file RangeException.php Class Class source
  Plain text file RegexException.php Class Class source
  Plain text file RequiredException.php Class Class source
  Plain text file SameException.php Class Class source
  Plain text file StringContainsException.php Class Class source
  Plain text file StringLengthException.php Class Class source
  Plain text file StringNotContainsException.php Class Class source
  Plain text file TimeConusumingException.php Class Class source
  Plain text file UniqueException.php Class Class source
  Plain text file ValidationMethodException.php Class Class source
  Plain text file ValidationPropertyException.php Class Class source

  Files folder image Files  /  RMValidator  /  Exceptions  /  Base  
File Role Description
  Plain text file IValidationException.php Class Class source

  Files folder image Files  /  RMValidator  /  Options  
File Role Description
  Plain text file OptionsModel.php Class Class source

  Files folder image Files  /  RMValidator  /  Validators  
File Role Description
  Plain text file MasterValidator.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageunit (1 directory)
Files folder image_data (1 file)
Files folder image_output (1 file)
Files folder image_support (4 files, 2 directories)
  Accessible without login Plain text file acceptance.suite.yml Data Auxiliary data
  Accessible without login Plain text file functional.suite.yml Data Auxiliary data
  Accessible without login Plain text file unit.suite.yml Data Auxiliary data

  Files folder image Files  /  tests  /  unit  
File Role Description
Files folder imageTests (10 directories)

  Files folder image Files  /  tests  /  unit  /  Tests  
File Role Description
Files folder imageCallbacks (1 file)
Files folder imageCollection (7 files)
Files folder imageDateTime (3 files)
Files folder imageFile (2 files)
Files folder imageGlobal (4 files)
Files folder imageNumbers (3 files)
Files folder imageObject (2 files)
Files folder imageOther (1 file)
Files folder imageProfile (2 files)
Files folder imageStrings (4 files)

  Files folder image Files  /  tests  /  unit  /  Tests  /  Callbacks  
File Role Description
  Plain text file ValidationCallbacksTest.php Class Class source

  Files folder image Files  /  tests  /  unit  /  Tests  /  Collection  
File Role Description
  Plain text file AllAttributeTest.php Class Class source
  Plain text file AnyAttributeTest.php Class Class source
  Plain text file CollectionAttributeTest.php Class Class source
  Plain text file CollectionTypeAttributeTest.php Class Class source
  Plain text file CountCollectionAttributeTest.php Class Class source
  Plain text file NestedCollectionAttributeTest.php Class Class source
  Plain text file UniqueAttributeTest.php Class Class source

  Files folder image Files  /  tests  /  unit  /  Tests  /  DateTime  
File Role Description
  Plain text file DateTimeAfterAttributeTest.php Class Class source
  Plain text file DateTimeBeforeAttributeTest.php Class Class source
  Plain text file DateTimeEqualsAttributeTest.php Class Class source

  Files folder image Files  /  tests  /  unit  /  Tests  /  File  
File Role Description
  Plain text file FileExtensionAttributeTest.php Class Class source
  Plain text file FileSizeAttributeTest.php Class Class source

  Files folder image Files  /  tests  /  unit  /  Tests  /  Global  
File Role Description
  Plain text file EqualAttributeTest.php Class Class source
  Plain text file InBetweenAttributeTest.php Class Class source
  Plain text file RequiredAttributeTest.php Class Class source
  Plain text file SameAttributeTest.php Class Class source

  Files folder image Files  /  tests  /  unit  /  Tests  /  Numbers  
File Role Description
  Plain text file BiggerAttributeTest.php Class Class source
  Plain text file LowerAttributeTest.php Class Class source
  Plain text file RangeAttributeTest.php Class Class source

  Files folder image Files  /  tests  /  unit  /  Tests  /  Object  
File Role Description
  Plain text file HasPropertyAttributeTest.php Class Class source
  Plain text file NestedAttributeTest.php Class Class source

  Files folder image Files  /  tests  /  unit  /  Tests  /  Other  
File Role Description
  Plain text file OrTest.php Class Class source

  Files folder image Files  /  tests  /  unit  /  Tests  /  Profile  
File Role Description
  Plain text file MemoryProfileAttributeTest.php Class Class source
  Plain text file TimeProfileAttributeTest.php Class Class source

  Files folder image Files  /  tests  /  unit  /  Tests  /  Strings  
File Role Description
  Plain text file RegexAttributeTest.php Class Class source
  Plain text file StringContainsAttributeTest.php Class Class source
  Plain text file StringLengthAttributeTest.php Class Class source
  Plain text file StringNotContainsAttributeTest.php Class Class source

  Files folder image Files  /  tests  /  _data  
File Role Description
  Accessible without login Plain text file .gitkeep Data Auxiliary data

  Files folder image Files  /  tests  /  _output  
File Role Description
  Accessible without login Plain text file .gitignore Data Auxiliary data

  Files folder image Files  /  tests  /  _support  
File Role Description
Files folder imageHelper (3 files)
Files folder image_generated (1 file)
  Accessible without login Plain text file .gitkeep Data Auxiliary data
  Plain text file AcceptanceTester.php Class Class source
  Plain text file FunctionalTester.php Class Class source
  Plain text file UnitTester.php Class Class source

  Files folder image Files  /  tests  /  _support  /  Helper  
File Role Description
  Plain text file Acceptance.php Class Class source
  Plain text file Functional.php Class Class source
  Plain text file Unit.php Class Class source

  Files folder image Files  /  tests  /  _support  /  _generated  
File Role Description
  Accessible without login Plain text file .gitignore Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:67
This week:4
All time:10,032
This week:35Up
For more information send a message to info at phpclasses dot org.