magium/zf2-xpath-validator

A simple validator to make sure that the provided text is valid Xpath

1 2018-01-29 13:56 UTC

This package is not auto-updated.

Last update: 2024-04-16 02:24:01 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