TwistPHP Documentation

Validate

File path: dist/twist/Core/Helpers/Validate.helper.php
Namespace: Twist\Core\Helpers
Extends: Base

Type: Class

Validate — Data validation helper can validate different types of data i.e Email Address, URLS, Telephone numbers, UK Postcodes and much more. Also includes a testing suite that allows testing of an array of data providing detailed results, very useful for HTML form validation.

Example Usage

<?php
//Set the variables for the example
$strEmailAddress 'foo';

//Call the function email with the example vars
Twist::Validate() -> email($strEmailAddress);

Method List

Method Access Returns
createTestpublicvoid
comparepublicvoid
emailpublicvoid
domainpublicvoid
urlpublicvoid
ippublicvoid
timestringpublicvoid
datestringpublicvoid
datetimepublicvoid
booleanpublicvoid
floatpublicvoid
integerpublicvoid
stringpublicvoid
telephonepublicvoid
postcodepublicvoid
regxpublicvoid