Vesthelm Engine

2.1.1 User Guide

Validation Class

The Validation class provides validation functions.

Calling the Validation Class

$Validation = $this->Validation;

Checking If Email Address is Correct

$email = 'test@vst.com';

$result = $this->Validation->isEmail($email);

echo $result; //Outputs (bool): true

Checking If URL is Correct

$url = 'http://www.vesthelm.com/';

$result = $this->Validation->isUrl($url);

echo $result; //Outputs (bool): true