Validation\Validator\Url

Class Phalcon\Validation\Validator\Url

extends abstract class Phalcon\Validation\Validator

implements Phalcon\Validation\ValidatorInterface

Checks if a value has a correct URL format

use Phalcon\Validation\Validator\Url as UrlValidator;

$validator->add('url', new UrlValidator(array(
   'message' => 'The url is not valid'
)));

Methods

public boolean validate (Phalcon\Validation $validator, string $attribute)

Executes the validation

登录查看完整内容