Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chamilo-lms/main/inc/lib/formvalidator/Rule/Url.php

24 lines
414 B

<?php
/**
* Abstract base class for QuickForm validation rules.
*/
/**
* Validate urls.
*/
class HTML_QuickForm_Rule_Url extends HTML_QuickForm_Rule
{
/**
* Validates url.
*
* @param string $url
*
* @return bool returns true if valid, false otherwise
*/
public function validate($url, $options)
{
return (bool) filter_var($url, FILTER_VALIDATE_URL);
}
}