Vegas CMF Validation

Vegas\Validation\Validator\Url

URL validation based on PHP filter_var function.

Example

namespace Foo\Forms;

use Phalcon\Forms\Element\Text;
use Vegas\Validation\Validator\Url;

class Bar extends \Vegas\Forms\Form
{
    public function initialize()
    {
        $url = new Text('url');
        $url->addValidator(new Url([
            'message' => $this->i18n->_('Invalid url!')
        ]));
        $this->add($url);

        // ...
    }
}