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-12-24 05:37:40 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