ggedde / spry-validator
Provider for Spry
1.0.1
2020-04-21 00:46 UTC
Requires
- php: >=5.4.0
This package is auto-updated.
Last update: 2026-02-21 23:58:00 UTC
README
Default Validator for Spry Params
Requires
- PHP 5.4^
- Spry-Core https://github.com/ggedde/spry-core
Usage
$name = Spry::validator()->validate('name'); // No Error on Failure $id = Spry::validator()->required()->integer()->min(1)->validate('id'); // Spry Stop Error if Empty or not an Integer $date = Spry::validator()->required()->date()->validate('date'); // Spry Stop Error if Empty or not a Date format $password = Spry::validator()->required()->minLength(12)->validate('password'); // Spry Stop Error if Length is less then 12