Neuron-PHP

IsRegExPattern extends Base
in package

Validator base class.

Table of Contents

Properties

$_pattern  : string

Methods

__construct()  : mixed
getPattern()  : string
Returns the regex pattern.
isValid()  : bool
Returns true if validation is successful
setPattern()  : void
Sets the regex pattern.
validate()  : bool
Abstract method to be implemented by all validators.

Properties

Methods

__construct()

public __construct(mixed $pattern) : mixed
Parameters
$pattern : mixed

getPattern()

Returns the regex pattern.

public getPattern() : string
Return values
string

isValid()

Returns true if validation is successful

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

setPattern()

Sets the regex pattern.

public setPattern(string $pattern) : void
Parameters
$pattern : string

validate()

Abstract method to be implemented by all validators.

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

        
On this page

Search results