TwistPHP Documentation

domain

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

domainValidate Domain Names, allows all of the following combinations
- localhost
- test.test.com
- test-1.test.com
- test.a.do-main.com
- a.b
The first character and last character of any part (split by .) cannot be a - or _ and the last part (.com or .co.uk) can only contain a-z

Parameters

Name Type Description
$strDomainstringn/a

Return Values

void — No return information has been documented for this function.

Example

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

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