https://github.com/heavenshell/php-silex-zf-validate
Silex Zend Validate extension
https://github.com/heavenshell/php-silex-zf-validate
Last synced: over 1 year ago
JSON representation
Silex Zend Validate extension
- Host: GitHub
- URL: https://github.com/heavenshell/php-silex-zf-validate
- Owner: heavenshell
- License: bsd-3-clause
- Created: 2011-05-18T16:16:54.000Z (about 15 years ago)
- Default Branch: master
- Last Pushed: 2011-12-31T08:09:20.000Z (over 14 years ago)
- Last Synced: 2025-03-06T02:12:10.961Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 105 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: license.txt
Awesome Lists containing this project
README
Zend_Validate extension.
This extension for the Silex microframework enables use Zend Framework's Zend_Validate.
register(new \Zf1\ValidateExtension(), array(
'zend.class_path' => $zendpath,
));
$app->get('/error', function () use ($app) {
$validator = $app['zend.validate']('alnum');
$result = $validator->isvalid('abcd++');
if ($result === false) {
$mssages = $validator->getMessages();
var_dump($messages);
}
return $result;
});
Notice:
Running tests or examples code
1. Set Zend Framework1 library to your include_path export ZF_PATH='/path/to/zf1/path'
2. export include_path
$ export ZF_PATH='/path/to/zf1/path'