I have a URL field that can be all kind of web URL's.
Is there one Zend framework validation classes that can help me like Zend_Validate_EmailAddress does for email ?
Thanks
There is a Zend\Validator\Uri. You can also use Zend\Form\Element\Url which uses URI Validator
Adrian's answer is correct, but if you are lazy like me and just want to copy/paste
From: http://framework.zend.com/manual/1.12/en/zend.uri.chapter.html
// Contains '|' symbol
// Normally, this would return false:
$valid = Zend_Uri::check('http://example.com/?q=this|that');
// However, you can allow "unwise" characters
Zend_Uri::setConfig(array('allow_unwise' => true));
// will return 'true'
$valid = Zend_Uri::check('http://example.com/?q=this|that');
// Reset the 'allow_unwise' value to the default FALSE
Zend_Uri::setConfig(array('allow_unwise' => false));
By default, Zend_Uri will not accept the following characters: "{", "}", "|", "\", "^", "`". These characters are defined by the RFC as "unwise" and invalid; however, many implementations do accept these characters as valid.