TwistPHP Documentation

Validate

File path: dist/twist/Core/Utilities/Validate.utility.php
Namespace: Twist\Core\Utilities
Extends: Base

Type: Utility

Validate — Data validation utility 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