Explore Server Side Testing SDK for PHP

BrowserContextParamValidator extends AbstractContextParamValidator

Validator for the browser context parameter Possible values: chrome, firefox, safari, edge, opera, ie, other

Table of Contents

Properties

$errorMessage  : string
$maxLength  : int
$validBrowsers  : array<string|int, mixed>
Valid browsers

Methods

getErrorMessage()  : string
Get the error message
validate()  : bool
Validate the browser value
validateMaxLength()  : bool
Validate that the value does not exceed the maximum length
validateNotEmpty()  : bool
Validate that the value is not empty

Properties

$validBrowsers

Valid browsers

private array<string|int, mixed> $validBrowsers = array('chrome', 'firefox', 'safari', 'edge', 'opera', 'ie', 'explorer', 'other')

Methods

validate()

Validate the browser value

public validate(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

validateMaxLength()

Validate that the value does not exceed the maximum length

protected validateMaxLength(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

validateNotEmpty()

Validate that the value is not empty

protected validateNotEmpty(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

        
On this page

Search results