magium / zf2-xpath-validator
A simple validator to make sure that the provided text is valid Xpath
Installs: 42
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 1
Open Issues: 0
pkg:composer/magium/zf2-xpath-validator
Requires
- phpunit/phpunit: ^4.1.0.0
- zendframework/zend-validator: ~2.5
This package is not auto-updated.
Last update: 2025-10-14 09:11:20 UTC
README
This is a simple ZF2 componente that will validate that an Xpath expression is valid, not that it will return certain data. Checkout the test cases to see how to use it.
Or, look here:
$validator = new \Magium\Validate\Xpath\XpathValidator();
$validator->isValid('//div'); // returns true
or
$validator = new \Magium\Validate\Xpath\XpathValidator();
$validator->isValid('invalid xpath'); // returns false