Skip to content

Attributes-PHP/validation-ext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Attributes Validation Extension

Attributes Validation Extension is a Pydantic-inspired PHP library for validating data via type hints at lightning speed ⚡️

Prerequisites

  • PHP 8.1 or later
  • PHP development headers and tools (phpize, php-config)
  • GCC or Clang compiler
  • GNU Make
  • autoconf 2.68 or later
  • libtool

macOS

brew install php autoconf libtool

Ubuntu/Debian

sudo apt-get install php-dev phpize autoconf libtool build-essential

Fedora/RHEL

sudo dnf install php-devel autoconf libtool gcc gcc-c++

Manual Build

phpize
./configure --enable-validation_ext
make

Optionally install:

sudo make install

Testing

Basic Functionality

php -d extension=modules/validation_ext.so -r "var_dump(class_exists('Attributes\Validation\Validator'));"

PHPT Tests

Run the complete PHPT test suite:

php run-tests.php

Clean

To clean all configure and build files:

make distclean

Validation extension was created by André Gil and is open-sourced software licensed under the MIT license.

About

⚡️Lightning-fast PHP validation via type hints

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors